Introduction of Mathematica
Mathematica is a symbolic mathematical computation program, sometimes called a computer
algebra program used in many scientific, engineering, mathematical and computing fields. It was
conceived by Stephen Wolfram and is developed by Wolfram Research of Champaign, Illinois. The
Wolfram Language is the programming language used in Mathematica.
Features of Wolfram Mathematica
Libraries of Mathematical Elementary function and specific function.
Support for complex number.
Matrix and Data Manipulation tools including support for sparse arrays.
2D and 3D data, function & geo visualization and animation tools.
Supporting procedural, functional, object-oriented construes and parallel programming.
Linear and Non-linear control system libraries.
Simple Arithmetic
Basic Operators
The basic Mathematical operators are as shown below.
^ Power
* Multiply
/ Divide
+ Add
- Subtract
Multiplication
You can’t have to use * to multiply two numbers. As in normal algebra, objects next to each other
signify multiplication. However, in most cases you will need to put in a space to make it clear what
you mean.
Expression Meaning Comment
AB A*B Multiply A by B
AB AB A single variable called AB
23 2×3 The cross is automatically inserted between numbers
2A 2*A Multiply A by 2
A2 A2 A single variable called A2
1
Bracket
(term) Parentheses for grouping
F[x] Square brackets for function
{a,b,c} Curly bracket for list
A[[i]] Double brackets for indexing (Part[a,i])
Some Mathematical Functions
Sqrt[x] √𝑥
Exp[x] 𝑒𝑥
Log[x] Log𝑒𝑥
Log[a,x] Loga𝑥
Sin[x], Cos[x], Tan[x] sin x, cos x, tan x
Abs[x] |x|, absolute value
Mod[m,n] m modulo n
Pi π
E e
Relational and Logical Operations
x == y Equal
x! = y or x ≠ y Unequal
x>y Greater than
x > = y or x ≥ y Greater than or equal to
x<y Less than
x < = y or x ≤ y Less than or equal to
2
Introduction of MATLAB
MATLAB (matrix laboratory) is a fourth-generation high-level programming language
and interactive environment for numerical computation, visualization and programming.
MATLAB is developed by MathWorks. It allows matrix manipulations; plotting of functions
and data; implementation of algorithms; creation of user interfaces; interfacing with programs
written in other languages, including C, C++, Java, and FORTRAN; analyze data; develop
algorithms; and create models and applications. It has numerous built-in commands and math
functions that help you in mathematical calculations, generating plots, and performing
numerical methods.
Features of MATLAB
Following are the basic features of MATLAB −
It is a high-level language for numerical computation, visualization and application
development.
It also provides an interactive environment for iterative exploration, design and
problem solving.
It provides vast library of mathematical functions for linear algebra, statistics, Fourier
analysis, filtering, optimization, numerical integration and solving ordinary differential
equations.
It provides built-in graphics for visualizing data and tools for creating custom plots.
MATLAB's programming interface gives development tools for improving code
quality maintainability and maximizing performance.
It provides tools for building applications with custom graphical interfaces.
It provides functions for integrating MATLAB based algorithms with external
applications and languages such as C, Java, .NET and Microsoft Excel.
MATLAB's Power of Computational Mathematics
MATLAB is used in every facet of computational mathematics. Following are some
commonly used mathematical calculations where it is used most commonly −
Dealing with Matrices and Arrays
2-D and 3-D Plotting and graphics
Linear Algebra
Algebraic Equations
Non-linear Functions
Statistics
Data Analysis
Calculus and Differential Equations
Numerical Calculations
Integration
Transforms
Curve Fitting
Various other special functions
3
MATLAB uses Three Primary Windows
1. Command Window : It is used to entre commands and data.
2. Graphics window : It is used to display plots and graphics.
3. Edit window : It is used to create and edit files.
Operations of MATLAB
+ Addition
- Subtraction
* Multiplication
/ Left division
\ Right division
^ Power
‘ Transpose
4
5
Practical Set – 2
Evaluate the following problems by using Mathematical Software
‘MATHEMATICA’.
2−4
1. lim 𝑥 .
𝑥→2 𝑥−2
4−1
2. lim 𝑥 .
𝑥→1 𝑥−1
3. lim √1+2𝑥−√1−2𝑥
𝑥
.
𝑥→0
𝑥2−4𝑥+3
4. lim .
𝑥→1 𝑥2−3𝑥+2
6
√𝑥+4−2
5. lim .
𝑥→0 𝑥
5 5
𝑥 ⁄2−𝑎 ⁄2
6. lim .
𝑥→𝑎 𝑥−𝑎
𝑥−1
7. lim 𝑒 .
𝑥→1 𝑥
𝑥−1
8. lim 𝑎 .
𝑥→0 𝑥
9. lim 𝑡𝑎𝑛𝑥 .
𝑥→0 𝑥
7
10. lim 𝑠𝑖𝑛𝑥 .
𝑥→0 𝑥
11. lim 𝑠𝑖𝑛7𝑥 .
𝑥→0 𝑡𝑎𝑛3𝑥
𝑥𝑐𝑜𝑡𝜃−𝜃𝑐𝑜𝑡𝑥
12. lim .
𝑥→0 𝑥−𝜃
8
Practical Set – 3
Find the one sides limit by using MATHEMATICA.
From the Left Hand Limit
1. lim √1+2𝑥−√1−2𝑥
𝑥
𝑥→0
𝑥−√2−𝑥2
2. lim
2𝑥−√2+2𝑥2
𝑥→1
3. lim 𝑠𝑖𝑛𝑥
𝑥→0 𝑥
𝑒5𝑥−1
4. lim 𝑥
.
𝑥→0 𝑥.3
log𝑒(1+𝑥)
5. lim .
𝑥→0 3𝑥
9
𝑇𝑎𝑛𝑥
6. lim .
𝑥→0 𝑥
3𝑥−1
7. lim .
𝑥→0 𝑥
|𝑥|
8. lim .
𝑥→0 𝑥
From the Right Hand Limit
1. lim √1+2𝑥−√1−2𝑥
𝑥
𝑥→0
𝑥−√2−𝑥2
2. lim 2𝑥−√2+2𝑥2
𝑥→1
10
3. lim 𝑠𝑖𝑛𝑥
𝑥→0 𝑥
𝑒5𝑥−1
4. lim 𝑥
.
𝑥→0 𝑥.3
log𝑒(1+𝑥)
5. lim .
𝑥→0 3𝑥
𝑇𝑎𝑛𝑥
6. lim .
𝑥→0 𝑥
3𝑥−1
7. lim .
𝑥→0 𝑥
|𝑥|
8. lim .
𝑥→0 𝑥
11
Practical Set-4
Find the Derivative of following function by using Mathematica:
𝑑𝑦
1. Find 𝑑𝑥 of
i. √𝑥
ii. 1
√𝑥
iii. x+ √𝑥
iv. √2𝑥 + 3
v. x+1.
𝑥
12
2. Find the derivative of
i. y = (3x4+ 4x2-5x+ 10)(2x2-3)
ii.
4𝑥
.
𝑥2−5
iii. y = √𝑥3 + 3𝑥 − 5
3. Find the derivative of
i. tan2x
ii. secx
13
iii. √𝑡𝑎𝑛𝑥
iv. √𝑠𝑖𝑛3𝑥
4. Find the derivative of y= tan2sin√𝑥.
5. Find the derivative of
i. sin-1x
ii. cos-1x
14
iii. tan-1x
iv. cosec-1x
v. sec-1x
vi. cot-1x.
15
6. Find the derivative of sinx with respect to cos x.
7. i. Logx
ii. ex
iii. e-3x
iv. ax.
16
Practical Set - 5
Find The Maximum and Minimum of the Function:
1. f(x)= x2- 6x+4
2. f(x)= x3-3x +1
17
3. f(x)= x3- 3x2-9x+27
4. y= 4x3- 6x2-9x+1
18
5. y= x+ 25/x
6. f(x)= x3-6x2+9x-2
19
7. A man who has 144m of fencing material wishes to enclose a rectangular garden. Find
the maximum area he can enclose.
» Let x be the length and y be the breadth of the garden.
From question,
Perimeter of garden = 144 m
or, 2(x+y) = 144
or, x+y = 52
or, y = 52-x
Now,
Area of garden = x * y
or, A = x * (52-x)
or, A = 52x-x2 ........................... (i)
For Maximum Area
y = 52-x = 52 – 26 = 26
So, Maximum Area = 676 at length = 26 and breadth = 26.
20
Find The Minimum of the given functions:
1. f(x)= x2- 6x+4
2. f(x)= x3-3x +1
3. f(x)= x3- 3x2-9x+27
21
4. y= 4x3- 6x2-9x+1
5. y= x+ 25/x
6. y= x4- 8x3+18x2-24
22
7. f(x)= x3-6x2+9x-2
23
Practical Set – 6
1. Plot the graphs of:
1. y= x2in[-8,8]
2. y=x2-2x+2x in [-4.4]
24
3. y= x3 in [-10,10]
4. y=logx in [-2,2].
25
5. Y= tanx in [-2𝜋,2 𝜋]
6. y= 1/sinx in [-2𝜋,2 𝜋]
26
7. ex in [-3,3]
2. Find the antiderivative of the following functions
1. ∫ 𝑠𝑒𝑐𝑥𝑑𝑥
2. ∫ 𝑙𝑜𝑔𝑥𝑑𝑥
3. ∫ √1 + 𝑐𝑜𝑠𝑥 𝑑𝑥
27
4. ∫ √ 𝑥2 − 16 𝑑𝑥
5. ∫ 𝑡𝑎𝑛𝑥𝑑𝑥
6. ∫ 𝑐𝑜𝑡𝑥𝑑𝑥
7. ∫ 𝑒𝑥𝑑𝑥
8. ∫ 𝑒−3𝑥𝑑𝑥
1
9. ∫ 2 𝑑𝑥
𝑥 +1
28
3. Definite integral
2
a) ∫ 0(𝑥 + 1)𝑑𝑥
2
b) ∫−1(2𝑥2 + 4𝑥 + 3)𝑑𝑥
2
c) ∫ (𝑥4 − 𝑥 − 1)𝑑𝑥𝑑𝑥
−2
𝜋
d) ∫−𝜋 𝑆𝑖𝑛𝑥𝑑𝑥
29
4. Improper integral
∞ 1
a. ∫0
𝑥2+1
∞ 1
b. ∫
−∞ 𝑥2+1
∞ 1
c. ∫
0 √𝑥
30