0% found this document useful (0 votes)
6 views

Math_Sara (1)

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)
6 views

Math_Sara (1)

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/ 2

Math Cheatsheet Newton’s Method Some Linearized Models:

Compiled by Eigen-π (https://www.linkedin.com/in/islamibr29/).


We are searching for a solution starting by an initial guess: x0 • Exponential Model:
bx
Licensed under CC BY-NC-SA 4.0. Please share comments, suggestions, y = ae
f (xi )
and errors at http://github.com/islamibr/today_i_learned. xi+1 = xi − We can write:
f ′ (xi )
ln y = ln a + bx
Last Updated May 28, 2024 Stopping Criterion Y = a0 + a1 X
• The required number of iterations is reached. • Power Model:
Solving a Linear System of Equations • Or |xi+1 − xi | < ϵ, where ϵ is the maximum error bound. y = ax
b

a11 x1 + a12 x2 + a13 x3 = b1 We can write:
Relative Percentage Error

a21 x1 + a22 x2 + a23 x3 = b2 log y = log a + b log x

a x + a x + a x = b xi+1 − xi
31 1 32 2 33 3 3 RP E = × 100% Y = a0 + a1 X
xi+1
Jacobi Method • Growth Rate Model:
ax
(0) (0)
Initial values: x1 , x2 , x3
(0) Linear Regression y=
b+x
(n) (n)
Given the Data Set We can write:
1 x+b

(n+1) b1 −a12 x2 −a13 x3

x = x y =
 1 a11
y ax


(n) (n)
(n+1) b2 −a21 x1 −a23 x3
x2 = a22 1 1 b 1

 (n) (n) = +
y a ax

 (n+1)
 b3 −a31 x1 −a32 x2
x3 = a33 • Number of points = n Y = a0 + a1 X
Gauss-Seidel Method • We need to find a straight line that best fits the given data:
(0) (0)
Initial values: x1 , x2 , x3
(0)
y = a0 + a1 x Numerical Differentiation
• To find a0 and a1 :
 (n)
b1 −a12 x2 −a13 x3
(n) Finite Difference of First Derivative
(n+1)
x1
 = x y x2 xy (y − a0 − a1 x)2 (y − ȳ)2
• Forward:
 a11

 (n+1) (n) f (xi+1 ) − f (xi )
(n+1) b2 −a21 x1 −a23 x3 ′
x2 = a22
f (xi ) = + O(h)

 (n+1) (n+1)
h
 (n+1)
 b3 −a31 x1 −a32 x2
x3 = a33 • Backward:
• Sum: ′ f (xi ) − f (xi−1 )
f (xi ) = + O(h)
Diagonally Dominant Matrix
X X X 2
X
x y x xy Sr St h
• Diagonally dominant matrix: • Central:
X Solve ′ f (xi+1 ) − f (xi−1 ) 2
|aii | ≥ |aij | f (xi ) = + O(h )
2h
n
! n
X X
i̸=j na0 + xi a1 = yi
• Strictly diagonally dominant matrix: i=1 i=1 Finite Difference of Second Derivative
n
! n
! n
X X X 2
X • Central:
|aii | > |aij | xi a0 + xi a1 = xi yi
i̸=j i=1 i=1 i=1 ′′ f (xi+1 ) − 2f (xi ) + f (xi−1 ) 2
f (xi ) = + O(h )
h2
• Convergence of the Jacobi & Gauss-Seidel Methods: Coefficient of Determination
To guarantee the convergence of these two methods, the
2 St − Sr Numerical Integration
coefficient matrix must be strictly diagonally dominant. r =
St
• Required to find an approximate value for the definite integral:
Solving a Nonlinear Equation Correlation Coefficient Z b
f (x) = 0 s
I = f (x)dx
St − Sr a
r=
Bisection Method St
• Step size = h
We are searching for a solution within an interval [a, b]. Mean of y Values
ai +bi
• Number of segments = n
1. Get xi = n
!
2 1 X
ȳ = yi b−a
2. Get f (xi ), f (ai ), f (bi ) n h=
i=1 n
3. If f (xi )f (ai ) > 0 (same sign), then the new interval is [xi , bi ],
otherwise it’s [ai , xi ] • For the model of the form:
x a a+h a + 2h ... a + kh ... b
4. Repeat f (y) = a0 + a1 g(x)
y y0 y1 y2 ... yk ... yn
Maximum error bound: We can use the substitution
b−a Trapezoidal Rule
ϵ= Y = f (y) and X = g(x)
2n
Then perform the linear regression to the model: n−1
!
 
b−a
 h X
n = log2 I ≈ y0 + yn + 2 yk
Y = a0 + a1 X 2
ϵ k=1
Simpson’s 1/3 Rule Bessel Function of the 1st kind Complex Analysis
n = even ∞
  X (−1)k (x/2)n+2k Complex Number
Jn (x) =
h
n−1
X n−2
X  k=0
k! Γ(n + k + 1) z = x + iy
I ≈ y0 + yn + 4 yk + 2 yk 
3  
nd
k=1 k=2
k: odd k: even
Bessel Function of the 2 kind Polar Form
cos(nπ)Jn (x) − J−n (x) z = r(cos θ + i sin θ)
Solution of Differential Equations Yn (x) =
sin(nπ)
Consider the differential equation:
From Cartesian to Polar:

y = F (x, y), at x = x0 , y = y0
Properties p −1
 
y
n
r= x2 + y 2 θ = tan
J−n (x) = (−1) Jn (x) for n = positive integer x
with the initial condition: r
y0 = f (x0 ) J1/2 (x) =
2
sin x
From Polar to Cartesian:
πx
x = r cos(θ) y = r sin(θ)
Step size is denoted as h. r
2
J−1/2 (x) = cos x
Euler’s Method πx Euler’s Formula

yn+1 = yn + h F (xn , yn ) Bessel Recurrence Relations e = cos(θ) + i sin(θ)

2n ∴ z = re
Heun’s Method (Improved Euler’s Method) Jn−1 (x) + Jn+1 (x) = Jn (x)
x
Predictor: ′ Power of Complex Number (De Moivre’s Theo-

yn+1 = yn + h F (xn , yn ) Jn−1 (x) − Jn+1 (x) = 2Jn (x)
rem)
Corrector: d n  n
x Jn (x) = x Jn−1 (x)
h dx Case 1: Integer Power (n ∈ Z)
∗ 
yn+1 = yn + F (xn , yn ) + F (xn+1 , yn+1 ) d  −n 
−n n
2 x Jn (x) = −x Jn+1 (x) (cos(θ) + i sin(θ)) = cos(nθ) + i sin(nθ)
dx
Gamma Function
 
Case 2: Rational Power n = pq
Integrals containing Bessel Functions
Definition d
Z
(cos(θ) + i sin(θ))
p/q
= cos(φ) + i sin(φ)
n  n n n
Z ∞ x Jn (x) = x Jn−1 (x) ⇒ x Jn−1 (x) dx = x Jn (x) + c
n−1 −x dx
Γ(n) = x e dx pθ + 2πk
0 φ= k = 0, 1, 2, . . . , (q − 1)
d  −n 
−n q
x Jn (x) = −x Jn+1 (x)
Properties dx
Differentiability and Derivative:
Z ∞
−x2
Z
2n−1 −n −n
Γ(n) = 2 e x dx ⇒ x Jn+1 (x) dx = −x Jn (x) + c If the Cauchy-Riemann equations are satisfied, the function f (z) is
0 differentiable and the derivative can be obtained as:

 
1
Γ
2
= π General Integral ′
f (z) =
dw
=
∂w
=
1 ∂w
Z
m+n dz ∂x i ∂y
Γ(n) = (n − 1)Γ(n − 1) m
x Jn (x) dx
Γ(n) = (n − 1)! For n = Positive integer 2 Analyticity:
Choose the more suitable rule:
• If the Cauchy-Riemann equations are satisfied at all points in a
Beta Function Odd domain D, then the function f (z) is analytic in D.
Definition • If the function f (z) is analytic at all points of the complex
If m > n: Z plane, we call it an entire function.
Z 1 m m
n−1 m−1 x Jn−1 (x) dx = x Jn (x) + c
B(n, m) = x (1 − x) dx • if f (z) is not differentiable at z = n ( n is called singular
0
point), then we call it analytic except at z = n
Properties Even • If the Cauchy-Riemann equations are not satisfied, then f (z) is
Z π/2 If m < n: not analytic in any domain, so we can say f (z) is nowhere
2n−1 2m−1
B(n, m) = 2 (cos θ) (sin θ) dθ analytic.
Z
m m
0 x Jn+1 (x) dx = −x Jn (x) + c
B(n, m) = B(m, n)
The result is in terms of 0x Jn (x) dx.
R
Γ(n)Γ(m)
B(n, m) =
Γ(n + m)
Complex Differentiation
Bessel Differential Equation For the function:
2 ′′ ′ 2 2
x y + xy + (x − n )y = 0 w = f (z) = u(x, y) + iv(x, y)
Solution Cauchy-Riemann equations:
y(x) = c1 Jn (x) + c2 J−n (x) for n ∈
/ {0, 1, 2, 3, . . .}
∂u ∂v ∂u ∂v
y(x) = c1 Jn (x) + c2 Yn (x) for n ∈ {0, 1, 2, 3, . . .} = and =−
∂x ∂y ∂y ∂x

You might also like