0% found this document useful (0 votes)
19 views10 pages

Final Presentation

Uploaded by

Syed Arsalan Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views10 pages

Final Presentation

Uploaded by

Syed Arsalan Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

SERIES

series is a sequence of numbers, terms, or elements arranged in a particular order. These


elements follow a pattern or rule, and each term in the series is related to the previous
one in a consistent
way

HERE ARE SOME EXAMPLE OF SUM AND PRODUCT OF SERIES

In[ ]:= Sumx^ii,{i,1,7}

x2 x3 x4 x5 x6 x7
Out[]= x+ + + + + +
2 3 4 5 6 7
In[ ]:= Sumx^ii,{i,7}
x2 x3 x4 x5 x6 x7
Out[]= x+ + + + + +
2 3 4 5 6 7
above example shows the starting point is default 1
In[ ]:= Sumx^ii,{i,8,6}
Out[]= 0

mathematica interprete it as a empty set

In[ ]:= Sumy^ii,{i,1,6,3}


y4
Out[]= y+
4
In[ ]:= Sum[i ^ 2, {i, 1, n}]
1
Out[]= n (1 + n) × (1 + 2 n)
6
In[ ]:= SumConvergence[i ^ 2, i]
Out[]= False
In[ ]:= Sum[1 / n ^ 2, {n, 1, Infinity}]
π2
Out[]=

6
In[ ]:= SumConvergence[1 / n ^ 2, n]
Out[]= True
2 final presentation.nb

In[ ]:= Sum[(x ^ i) (y ^ j), {i, 1, 2}, {j, 1, 2}]


Out[]= x y + x 2 y + x y 2 + x 2 y2
In[ ]:= Sum[(x ^ i) (y ^ j), {i, 1, 2}, {j, 1, i}]
Out[]= x y + x 2 y + x 2 y2
In[ ]:= Sum[x ^ (i (i + 1)), {i, 1, Infinity}]
-2 x1/4 + EllipticTheta[2, 0, x]
Out[]=

2 x1/4
In[ ]:= Product[x + i, {i, 1, 4}]
Out[]= (1 + x) × (2 + x) × (3 + x) × (4 + x)

In[ ]:= POWER SERIES


A power series is a special type of infinite series representing a mathematical function in the form
APPLICATIONS
Engineering, Physics, Finance, Computer Graphics , Signal Processing , Mathematics

In[ ]:= Series[Exp[x], {x, 0, 2}]


x2
Out[]= 1+x+ + O[x]3
2
In[ ]:= Series[Exp[1/x],{x,0,2}]
1
+O[x]3
Out[]= x

In[ ]:= Series[Exp[x], {x, 1, 4}]


1 1 1
Out[]=  +  (x - 1) +  (x - 1)2 +  (x - 1)3 +  (x - 1)4 + O[x - 1]5
2 6 24
final presentation.nb 3

In[ ]:= Series[f[x], {x, 0, 3}]


1 1
Out[]= f[0] + f′[0] x + f′′[0] x2 +
f(3)[0] x3 + O[x]4
2 6
In[ ]:= Series[Exp[x] / x ^ 2, {x, 0, 4}]
1 1 1 x x2 x3 x4
Out[]= + + + + O[x]5
+ + +
x2 x 2 6 24 120 720
In[ ]:= Series[Exp[1 / x], {x, Infinity, 3}]
1 1 1 1 4
Out[]= 1+ + + + O 
2 3
x 2x 6x x

REPRESENTATION OF POWER SERIES


The power series is printed out as a sum of terms, ending with O[x] raised to a power
In[ ]:= Series[Cos[x], {x, 0, 4}]
x2 x4
Out[]= 1- + + O[x]5
2 24
In[ ]:= InputForm[%]
Out[]//InputForm= SeriesData[x, 0, {1, 0, -1/2, 0, 1/24}, 0, 5, 1]

OPERATIONS ON POWER SERIES


ADDITION OF POWER SERIES
This code add two power series x^2 + x^3 and x^4 + x^5 up to the 5 th order term
In[ ]:= Series[x ^ 2 + x ^ 3, {x, 0, 5}] + Series[x ^ 4 + x ^ 5, {x, 0, 5}]

Out[]= x2 + x3 + x4 + x5 + O[x]6

Multiplication of Power Series:


This code multiplies two power series x^2 and x^3 up to the 3rd order term.
In[ ]:= Series[x ^ 2, {x, 0, 3}] * Series[x ^ 3, {x, 0, 3}]
Out[]= x5 + O[x]6

Differentiation of Power Series:


This code calculates the 5th order coefficient of the derivative of 1/(1-x).
In[ ]:= series = Series[x ^ 3 - x ^ 2 + x, {x, 0, 5}]
Out[]= x - x2 + x3 + O[x]6
In[ ]:= D[series, x]
Out[]= 1 - 2 x + 3 x2 + O[x]5

Integration of Power Series:


This code integrates the power series x^2 up to the 3rd order term with respect to x.
In[ ]:= Integrate[Series[x ^ 2, {x, 0, 3}], x]
x3
Out[]= + O[x]5
3
These examples demonstrate how to perform basic oper ations like addition, multiplica-
4 final presentation.nb

tion, differentiation, and integration on power series using Mathematica.


COMPOSITION AND INVERSION OF POWER SERIES:
Inversion of a power series involves finding a new series that represents the inverse
function of the original series.
In Mathematica, you can use the “InverseSeries” function to find the inversion of a
power series.
Composition of power series involves combining two power series to form a new series.
In Mathematica, you can achieve this by substituting one series into another using the
“/.” operator.
In[ ]:= InverseSeries[Series[Log[1 + x], {x, 0, 5}]]
x2 x3 x4 x5
Out[]= x+ + + O[x]6
+ +
2 6 24 120
In[ ]:= Series[Exp[x] - 1, {x, 0, 5}] /. x  Series[x ^ 2, {x, 0, 3}]
Out[]= x2 + O[x]4

Converting Power Series to Normal Expressions


Power series in Mathematica are represented in a special internal form, which keeps track of
such attributes as their expansion order.
For some purposes, you may want to convert power series to normal expressions. From a
mathematical point of view, this corresponds to truncating the power series, and assuming
that all higher-order terms are zero.
General code:

In[ ]:= t = Series[cos[x], {x, 0, 5}]


1 1 1 1
Out[]= cos[0] + cos′[0] x + cos′′[0] x2 + cos(3)[0] x3 + cos(4)[0] x4 + cos(5)[0] x5 + O[x]6
2 6 24 120
In[ ]:= Normal[t]
1 1 1 1
Out[]= cos[0] + x cos′[0] + x2 cos′′[0] + x3 cos(3)[0] + x4 cos(4)[0] + x5 cos(5)[0]
2 6 24 120
In[ ]:= Factor[%]
1
Out[]= × 120 cos[0] + 120 x cos′[0] + 60 x2 cos′′[0] + 20 x3 cos(3)[0] + 5 x4 cos(4)[0] + x5 cos(5)[0]
120
SERIES COEFFICIENT

In[ ]:= SeriesCoefficient[t, 3]


1
Out[]= cos(3)[0]
6
final presentation.nb 5

In[ ]:= SeriesCoefficient[Exp[-x], {x, 0, n}]


(-1)n
n≥0
Out[]= n!
0 True
In[ ]:= Table[%, {n, 0, 5}]

1 1 1 1
Out[]= 1, -1, ,- , ,- 
2 6 24 120
Solving Equations Involving Power Series

In[ ]:= y = 1 + Sum[a[i] x ^ i, {i, 3}] + O[x] ^ 4


Out[]= 1 + a[1] x + a[2] x2 + a[3] x3 + O[x]4
In[ ]:= D[y, x] - y  x
Out[]= (-1 + a[1]) + (-a[1] + 2 a[2]) x + (-a[2] + 3 a[3]) x2 + O[x]3  x

SOLVING RECURRENCE EQNs


Recurrence equations describe how each term in a sequence depends on previous terms.
RSolve takes recurrence eqn and solves them to get explicit formulas for a[n].

LINEAR RECURRENCE EQN


Linear recurrence equations have terms that depend on previous terms in a simple, linear
way, typically involving addition and multiplication by constants.
In[ ]:= RSolve[{a[n]  2 a[n - 1], a[1]  1}, a[n], n]
Out[]= a[n]  2-1+n
In[ ]:= Table[2 ^ (n - 1), {n, 10}]
Out[]= {1, 2, 4, 8, 16, 32, 64, 128, 256, 512}
In[ ]:= RSolve[a[n]  2 a[n - 1], a[n], n]
Out[]= a[n]  2-1+n 1

This solves a recurrence equation for a geometric series.


In[ ]:= RSolve[{a[n]  r a[n - 1] + 1, a[1]  1}, a[n], n]
-1 + rn
Out[]= a[n]  
-1 + r
In[ ]:= RSolve[{a[n + 1]  r a[n] + 1, a[1]  1}, a[n], n]
-1 + rn
Out[]= a[n]  
-1 + r
SECOND - ORDER RECUENCE EQN
In second - order linear recurrence equation, each term depends on two previous terms .
In[ ]:= RSolve[{a[n]  4 a[n - 1] + a[n - 2]}, a[n], n]
n n
Out[]= a[n]  2 - 5  1 + 2 + 5  2
In[ ]:= RSolve[{a[n]  a[n - 1] + a[n - 2], a[1]  a[2]  1}, a[n], n]
Out[]= {{a[n]  Fibonacci[n]}}
6 final presentation.nb

In[ ]:= RSolve[{a[n + 1]  n a[n] + a[n - 1], a[1]  0, a[2]  1}, a[n], n]
BesselI[n, -2] BesselK[1, 2] + BesselI[1, 2] BesselK[n, 2]
Out[]= a[n]  
BesselI[2, 2] BesselK[1, 2] + BesselI[1, 2] BesselK[2, 2]

NON-LINEAR RECURRENCE EQ.


Nonlinear recurrence equations have terms that depend on previous terms in a nonlinear way,
involving operations like exponentiation, multiplication/division by variables or functions,
trigonometric functions, etc.
In[ ]:= RSolve[{a[n]  a[n + 1] × a[n - 1]}, a[n], n]
1  3 n 1  3 n
 +  1 + -  2
Out[]= a[n]   2 2 2 2 
In[ ]:= RSolve[{a[n]  (a[n + 1] × a[n - 1]) ^ 2}, a[n], n]
1  15 n 1  15 n 2π 1  15 n 1  15 n
 -  1 + +  2 + -  1 + +  2
Out[]= a[n]   4 4 4 4 , a[n]   3 4 4 4 4 

Q-Difference Equations
q-difference equations are those in which the arguments of a are related by multiplicative
factors.
In[ ]:= RSolve[a[q n]  n a[n], a[n], n]
1 Log[n]
×-1+ 
Out[]= a[n]  n 2 Log[q] 1
In[ ]:= RSolve[a[n]  a[q n] + a[n / q], a[n], n]
π π
-
Out[]= a[n]  n 3 Log[q] 1 + n 3 Log[q] 2

COUPLED SYSTEM OF RECURRENCE EQN

In[ ]:= RSolve[{a[n]  b[n - 1] + n, b[n]  a[n - 1] - n, a[1]  b[1]  1}, {a[n], b[n]}, n]
1 1
Out[]= a[n]  × 4 + 3 (-1)n + (-1)2 n + 2 (-1)2 n n, b[n]  × 4 - 3 (-1)n + (-1)1+2 n - 2 (-1)2 n n
4 4
PARTIAL RECURRENCE EQN

In[ ]:= RSolve[{a[i + 1, j]  2 a[i, j]}, a[i, j], {i, j}]


Out[]= a[i, j]  2-1+i 1[j]

Introduction to Residues
- Residues are defined in the context of complex analysis as the coefficient of the (
frac{1}{z-a} ) term in the Laurent series expansion of a function around a singular point ( a ).
This is essential for understanding how functions behave near points of singularity.
Basic Concepts
the `Residue` function in Mathematica and its basic syntax.
Residue[f, {z, z0}]
. Calculating Simple Residues
final presentation.nb 7

In[ ]:= Residue[1 / (z ^ 2 + 4), {z, 2 I}]



Out[]= -
4
In[ ]:= ResidueExp[z]  (z - Pi), {z, Pi}
Out[]= π

Residues at Essential Singularities and Multiple Poles


- how to compute residues at essential singularities and poles of higher order
In[ ]:= Residue[Exp[1 / z], {z, 0}]
1
Out[]= Residue z , {z, 0}
In[ ]:= Residue[(z + 1) / (z - 1) ^ 3, {z, 1}]
Out[]= 0

Using Residues to Evaluate Integrals


In[ ]:= residues = Residue[z / (Exp[z] - 1), {z, 2 Pi I k}]
Out[]= 0
In[ ]:= integral = 2 Pi I Total[residues]
Out[]= 0

Introduction to Limits
In calculus, a limit is a fundamental concept that describes the behavior of a function as its
input (or variable) approaches a certain value.
Limits help us understand what happens to a function at a specific point, even if the function
is not explicitly defined at that point
Basic Limit Calculations
- how to calculate limits at a point
In[ ]:= Limit[x ^ 2, x  2]
Out[]= 4

A limit that doesn’t exist and how Mathematica handles it


In[ ]:= Limit[1 / x, x  0]
Out[]= Indeterminate

Limits Involving Infinity


In[ ]:= Limit[(3 x ^ 3 + x ^ 2) / (x ^ 3 - 1), x  Infinity]
Out[]= 3

One-sided Limits
- These are limits that approach a point from one direction—either from the left or the right.
- finding a right-hand limit and a left-hand limit.
In[ ]:= Limit[1 / x, x  0, Direction  "FromAbove"]
Limit[1 / x, x  0, Direction  "FromBelow"]
Out[]= ∞
Out[]= -∞
8 final presentation.nb

Limits Involving Trigonometric Functions


- Trigonometric functions often have interesting limits, like
In[ ]:= LimitSin[x]  x, x  0
Out[]= 1

Exploring Complex Functions


- limit involving a more complex function or an expression where direct substitution is not
possible
In[ ]:= Limit[(x ^ 2 - 4) / (x - 2), x  2]
Out[]= 4

Using ‘Assumptions’ in Limits


- how to use assumptions to refine the results of limits, especially when dealing with
inequalities or conditional limits
In[ ]:= Limit[Exp[-x ^ 2] / x, x  Infinity, Assumptions  x > 0]
Out[]= 0

Introduction to Pade Approximations


- Pade approximations are rational functions (ratios of two polynomials) that are used to
approximate functions.
- Pade approximations often provide superior accuracy over Taylor series, particularly near
points where the function’s behavior is complex (like near singularities).
Pade Approximation in Mathematica
- basic syntax:
PadeApproximant[function, {variable, expansion point, {n, m}}]
where ( n ) is the order of the numerator polynomial and ( m ) is the order of the denomi-
nator polynomial
Simple Examples
- how to calculate a Pade approximation of simple functions, like \( e^x \), around \( x = 0
\)
In[ ]:= PadeApproximant[Exp[x], {x, 0, {3, 2}}]
3x 3 x2 x3
1+ + +
5 20 60
Out[]=

2x x2
1- +
5 20

Complex Functions
- Applying Pade approximations to more complex functions.
In[ ]:= PadeApproximantSin[x]  x, {x, 0, {4, 5}}
53 x2 551 x4
1- +
396 166 320
Out[]=

13 x2 5 x4
1+ +
396 11 088
final presentation.nb 9
10 final presentation.nb

You might also like