First Order ODEs
Example from notes
Solve: y′+3y=e−2x
Solution:
Integrating factor: μ=e∫3dx=e3x
dxd(e3xy)=e3xe−2x=ex
e3xy=ex+C
y=e−2x+Ce−3x
Second Order ODEs
Example: Damped Oscillator
Solve y′′+4y′+5y=0 with y(0)=1, y′(0)=0.
Characteristic equation: λ2+4λ+5=0
λ=2−4±16−20=−2±i
General solution: y=e−2x(Acosx+Bsinx)
Apply initial conditions:
y(0)=A=1
y′(x)=−2e−2x(cosx+Bsinx)+e−2x(−sinx+Bcosx)
y′(0)=−2(1)+B=0⇒B=2
Solution: y=e−2x(cosx+2sinx)
Lagrange Multipliers
Maximum of f(x,y)=xy on x2+4y2=1
Set up: L=xy−λ(x2+4y2−1)
Equations:
- y−2λx=0 … (i)
- x−8λy=0 … (ii)
- x2+4y2=1 … (iii)
From (i): λ=2xy
Substitute into (ii): x−2x8y2=x−x4y2=0
x2=4y2
From (iii): 4y2+4y2=8y2=1
y=±221
x=±21
Maximum: f=221⋅221=81
(When signs match.)
Vector Calculus
Line Integral Example
Compute ∫CF⋅dr for F=(y,x) along C:
- Straight line from (0,0) to (1,1)
- Curve y=x2 from (0,0) to (1,1)
Check if conservative:
∇×F=∂x∂Fy−∂y∂Fx=∂x∂x−∂y∂y=1−1=0
F is conservative. Find potential: ϕ=xy+C.
Line integral = ϕ(1,1)−ϕ(0,0)=1
Both paths give the same result: 1.
Stokes’ Theorem Verification
Verify Stokes’ theorem for F=(−y,x,0) on circle x2+y2≤a2 in plane z=0.
Curl: ∇×F=(0,0,2)
Surface integral: ∫S(∇×F)⋅dS=∫S2dS=2πa2
Line integral: Boundary is circle x2+y2=a2 at z=0.
r=(acosθ,asinθ,0)
dr=(−asinθ,acosθ,0)dθ
F=(−asinθ,acosθ,0)
F⋅dr=a2sin2θ+a2cos2θ=a2
∮F⋅dr=∫02πa2dθ=2πa2
Both equal: 2πa2
Fourier Series
Parseval’s Theorem Application
Use Fourier series for f(x)=x on [−π,π] to evaluate ∑n=1∞n21.
Fourier coefficients:
Since f is odd: an=0.
bn=π1∫−ππxsin(nx)dx=n2(−1)n+1
Parseval:
2π1∫−ππx2dx=21∑n=1∞bn2
3π2=21∑n24
∑n=1∞n21=6π2
Fourier Series of Square Wave
f(x)={−11−π<x<00<x<π
Even though f is odd, this gives a series with only sine terms:
f(x)=π4(sinx+31sin3x+51sin5x+⋯)
=π4∑k=0∞2k+1sin((2k+1)x)
Note: This can also be obtained by differentiating the triangle wave series.