• ECE 205 Notes

    First Order Linear Differential Equations

    y+p(x)y=f(x)

    Variation of Parameters Method

    Find a integrating factor μ(x) that makes μ(x)y+μ(x)p(x)y=(μ(x)y)=f(x)μ(x)

    Then μ(x)y=f(x)μ(x)dx

    μ(x)p(x)=μ(x)μ(x)=ep(x)dx(Separating variables)

    Homegeneous

    y+p(x)y=0

    y(x)=Cep(x)dx

    Non-Homegeneous

    y+p(x)y=f(x)

    Use variation of parameters Method

    Existence and Uniqueness of solution Theorem (?)

    y1 is any nontrival solution to non-homogeneous equation

    General solution:

    y(x)=y1(x)(c+f(x)y1(x)dx)

    Unique solution for y(x0)=y0:

    y(x)=y1(x)(y0y1(0)+x0xf(t)y1(t)dt)

     

    Separable Equations (Separting Variables Method)

    A differential equation is said to be separable if it can be written as h(y)y=g(x)

    h(y)dy=g(x)dx

    h(y)dy=g(x)dx

    H(y)=G(x)+C

    Implicit Solutions

    A relation G(x,y)=0, is said to be an implicit solution on the interval I if it defines one or more explicit solution on I.

    Constant Solution

    y=0, 注意不要漏掉这些解

     

    Difference between linear and non-linear equations

    对于linear equation,可以选取任意的y0,总可以通过选择合适的常量C使general solution变成IVP y(x0)=y0的解(x0(a,b)

    对于non-linear equation,对于不同的y0,interval of valiadity 会变化(x0 的范围随y0变化)

     

    Exact Equations

    The differential equation form M(x,y)dx+N(x,y)dy=0 is said to be exact in a rectangle R if there is a function F(x,y) such that: Fx=M and Fy=N, for all (x,y)R

    Check for existance of F

    M(x,y)dx+N(x,y)dy=0 is an exact equation in R if and only if My=Nx for all (x,y)R

    My=Fxy=Fyx=Nx

    Integrating factor:
    (μM)y=(μN)xμyM+μMy=μxN+μNxμyMμxN=(NxMy)μ

    When μy=0

    μxN=(NxMy)μ

    μ=MyNxNμ

    μ(x)=eMyNxNdx

     

    When μx=0

    μyM=(NxMy)μ

    μ=NxMyMμ

    μ(y)=eNxMyMdx

     

    Then, use either of them to find F

    F=Fxdx+g(y)=μ(x)M(x,y)dx+g(y)

    Fy=(μ(x)M(x,y)dx)y+g(y)=μ(x)N(x,y)

     

    The solution is F=C

     

    Second Order Linear Differential Equations

    y+p(x)y+q(x)y=f(x)

    Homogeneous Linear Equations

    y+p(x)y+q(x)y=0

    If y1 and y2 are solutions of the homogeneous equation, then any linear combination y=c1y1+c2y2 is also a solution on (a,b)

    The set {y1,y2} is a fundemental set if {y1,y2} is linearly independent on (a,b)

    Wronskian

    W[y1,y2](x):=|y1y2y1y2|=y1y2+y2y1

    y1,y2 are linearly independent on (a,b) if and only if W has no zeros on (a,b)

    Abel's Formula
    W(x)=W(x0)ex0xp(t)dt

    因此,W要么都不为0,要么都是0

    Constant Coefficients Homegeneous Equations

    ay+by+cy=0

    Let y(x)=erx

    ar2erx+brerx+cerx=erx(ar2+br+c)=0

    Characteristic Equation: ar2+br+c=0

    Solution: y=erx, where r=b±b24ac2a

    Distinct Real Roots

    y(x)=c1erx+c2erx

    Repeated Real Root

    y1(x)=erx

    Assume y2(x)=u(x)erx

    y2(x)=u(x)erx+u(x)rerx

    y2(x)=u(x)erx+u(x)rerx+u(x)rerx+u(x)r2erx

    au(x)erx+(2ar+b)u(x)erx+(ar2+br+c)u(x)erx=0

    当选择r为Repeated Real Root时,ar2+br+c=0, 2ar+b=d(ar2+br+c)dr=0 (二次函数的顶点)

    因此au(x)erx=0u(x)=k1u(x)=k1x+k0

    Choose k1=1,k0=0y2(x)=xerx

    y(x)=c1erx+c2xerx

    Complex Conjugate Roots

    Euler's formula: eiθ=cosθ+isinθ

    y(x)=c1e(α+iβ)x+c2e(αiβ)x=c1eαx(cos(βx)+isin(βx))+c2eαx(cos(βx)isin(βx))=(c1+c2)eαxcos(βx)+(c1ic2i)eαxsin(βx)=c1eαxcos(βx)+c2eαxsin(βx)

    Non-Homogeneous Linear Equations

    The Method of Undetermined Coefficients

    ay+by+cy=Cxmerx

    yp(x)=xs(Amxm++A1x+A0)erx

    s = 0: r is not a root to charastic equation

    s = 1: r is simple root to charastic equation

    s = 2: r is double root to charastic equation

    ay+by+cy=Cxmeαxcos(βx) (or sin(βx) )

    yp(x)=xs(Amxm++A1x+A0)eαxcos(βx)+xs(Bmxm++B1x+B0)eαxsin(βx)

    s = 0: α+iβ is not a root to charastic equation

    s = 1: α+iβ is a root to charastic equation

    The Superposition Principle

    If y1 is a solution to ay+by+cy=f1(x), y2 is a solution to ay+by+cy=f2(x)

    Then, y=k1y1+k2y2 is a solution to the differential equation: ay+by+cy=k1f1(x)+k2f2(x)

    For any non-homogeneous linear equation ay+by+cy=f(x), the solution is given by the sum of Complementary Solution and Particular Solution

    y(x)=c1y1(x)+c2y2(x)+yp(x)

    参考线性代数中的nullspace和particular solution

    Variation of parameters

    ay+by+cy=f(x)

    yh(x)=C1y1(x)+C2y2(x)

    Instead of constants, let them be functions

    yp(x)=v1y1+v2y2

    为了简化运算,令v1y1+v2y2=0

    yp(x)=v1y1+v1y1+v2y2+v2y2=v1y1+v2y2

    yp(x)=v1y1+v1y1+v2y2+v2y2=v1y1+v1y1+v2y2+v2y2

    v1(ay1+by1+cy1)+v2(ay2+by2+cy2)+a(v1y1+v2y2)=f(x)

    因为y1,y2 为Homogeneous equation solution, ay1+by1+cy1=ay2+by2+cy2=0

    a(v1y1+v2y2)=f(x)

    在带上之前的假设v1y1+v2y2=0

    {v1y1+v2y2=0a(v1y1+v2y2)=f(x){v1y1y1+v2y2y1=0v1y1y1+v2y2y1=y1f(x)/a

    v2(y2y1y2y1)=y1f(x)/a

    Subsititue back

    {v1=y2f(x)a(y1y2y1y2)v2=y1f(x)a(y1y2y1y2)

    Note that W=y1y2+y1y2

    v1=y2f(x)aWdx

    v2=y1f(x)aWdx

    这个积分,若令常数项C=0,则为Particular solution yp(x)

    令常数项分别等于C1,C2,则y(x)=v1y1+v2y2 (积分的常数项变成了general solution)

    Application: Spring problems

    mu+γu+ku=F(t)

    Laplace Transform

    Integral Transforms

    Useful tool for solving linear differential equations. An integral transform is a relation of the form F(s)=0k(s,t)f(t)dt, where k(s,t) is a given function called kernel of transformation

    T-domain IVP --transform--> S-domain IVP --solve--> S-domain solution --inverse transform--> T-domain solution

    Laplace Transform

    F(s)=0estf(t)dt

    Notation: L{f(t)}=F(s)

    The laplace transform replaces linear constant coefficients D.E. in the t-domain by simpler algebraic equation in the s-domain

    Properties of Laplace transform

    [Theorem] Let f1,f2 be functions whose Laplace transfroms exist for s>α, and let c1,c2 be constants, then for s>α

    L{c1f1+c2f2}=c1L{f1}+c2L{f2}

    拉普拉斯变换是线性的

     

    [Def] A function f(t) is said to be piecewie continuous on a finite interval [a,b] if f(t) is continuous at every point in [a,b], except possible for a finite number of points which f(t) has a jump discontinuity. A function f(t) is said to be piecewise continuous on [0,) if f(t) is piecewise continuous on [0,T] for all T>0

     

    [Def] A function f(t) is said to be exponential order α if there exist positive constants T and M such that |f(t)|Meαt

     

    [Theorem] If f(t) is piecewise continuous [0,) and of exponential order α, then L{f}(s) exists for s>α

    [例] f(t) = 1/t 不存在拉普拉斯变换

     

    [Theorem] If the Laplace transform L{f(t)}(s)=F(s) exists for s>α, then L{eαtf(t)}(s)=F(sa),s>α+a

    乘一个指数倍相当于在s域上平移

    [例] L{sin(bt)}=bs2+b2, L{eatsin(bt)}=b(sa)2+b2

    The Inverse Laplace Transform

    [Def] Given a function F(s), if there is a function f(t) that is continuous on [0,) and satisfies L{f}=F, then we say f(t) is the inverse Laplace Transform of F(s) and employ f=L1{F}

    [Theorem] L1{c1F1+c2F2}=c1L1{F1}+c2L1{F2}

    拉普拉斯逆变换也是线性的

    Partial Function Decomposition
    For non-repeated linear factors

    Q(s)=(sr1)(sr2)(srn),riR, then P(s)Q(s)=A1sr1+A2sr2++Ansrn

    For repeated linear factors

    Q(s)=(sr)m(sr1)(sr2)(srn), then P(s)Q(s)=A1sr+A2(sr)2++Am(sr)m+

    一般思路:进行partial fraction decomposition后,对每一个项进行逆变换

    Solution of initial value problem

    [Theorem] Let f(t) be continuous on [0,) and f'(t) be piecewise continuous on [0,) with both exponential order α. Then, for s>α, L{f}(s)=sL{f}(s)f(0)

    Generalize之后:

    [Theorem] Let f(t),f(t),...,f(n1)(t) be continuous on [0,) and f(n)(t) be piecewise continuous on [0,) with all these functions exponential order α. Then, for s>α, L{f(n)}(s)=snL{f}(s)sn1f(0)sn2f(0)...f(n1)(0)

    Screen Shot 2023-03-30 at 11.34.59 AM

    Laplace Transform of Piecewise Continuous Functions

    Unit Step function
    u(t)={0,t<01,t0u(ta)=ua(t)={0,t<a1,ta

    [Theorem] Let g be defined on [0,). Suppose a0 and L{g(t+a)} exists for s>s0. Then L{u(ta)g(t)} exists for s>s0, and L{u(ta)g(t)}=esaL{g(t+a)}

    同理,L{u(ta)g(ta)}=esaL{g(t)}

    Constant coefficient equations

    如果要有解必须满足

    1. y(0)=k0,y(0)=k1

    2. y,y[0,)上连续

    3. y在每个开区间都是有定义的,同时在每个间断点都有左右极限

    Convolution

    [Def] The convolution fg of two functions f and g is defined by

    (fg)(t)=0tf(τ)g(tτ)dτ

    Properties

    fg=gf f(g+h)=fg+fh (fg)h=f(gh) f0=0

     

    [Theorem] IfL{f}=F, and L{g}=G, then L{fg}=FG

    Constant Coefficient Equations with Impulses

    Dirac Delta furction δ:

    δ(t)=0,t0δ(t)dt=1

    L{δ(t)}=1

    L{δ(tt0)}=est0

    Fourier Series

    f(x)=a02+Σm=1[amcos(mπxL)+bmsin(mπxL)]

    cos(mπxL)sin(mπxL)的特性

    Common Period: T=2π/ω=2L/m, 因此,f(x)的最大周期为2L

    Orthogonality

    类似线性代数,定义函数的inner product 为(u,v)=αβu(t)v(t)dt

    并且定义u(t),v(t)在interval [α,β]上orthogonal 若 inner product = 0, a set of functions is said to be mutually orthogonal if each distinct pair of functions in the set is orthogonal

    [Theorem] The functions cos(mπxL),sin(mπxL), m=1,2,... form a mutually orthogonal set on the interval LxL

    可以用积化和差公式证明,只有当同为sin或同为cos时,且m = n时,inner product = L, 否则= 0

    奇偶函数积分性质: aa(odd)=0, aa(even)=02a(even)

     

    Computing Fourier Coefficients

    am=1LLLf(x)cos(mπxL)dx

    bm=1LLLf(x)sin(mπxL)dx

    利用的是orthogonality,乘上一个指定频率的三角函数后,由于orthogonality,只会得到f(x)中频率以及相位符合的那个分量的系数,其余的都互相垂直,积分为0

    对于a0,直接对原式求积分

    LLf(x)dx=LLa02dx+Σm=1[LLamcos(mπxL)dx+LLbmsin(mπxL)dx]

    由于三角函数的一个完整周期的积分 = 0,因此

    LLf(x)dx=LLa02dxa0=1LLLf(x)dx

     

    Initial-boundry value problem - The Heat Equation

    PDE: ut=βuxx,0<x<L,t>0

    Boundry Conditions: u(0,t)=u(L,t)=0

    Initial Condition(t = 0): u(x,0)=f(x)

    解法:

    Separation of Variables, suppose u(x,t)=X(x)T(t)

    ut=βuxxX(x)T(t)=βX(x)T(t)

    T(t)βT(t)=X(x)X(x)=λ

    于是我们得到了两个ODE

    X(x)+λX(x)=0

    T(t)+λβT(t)=0

    我们现在考虑Boundry Conditions

    u(0,t)=X(0)T(t)=0

    u(L,t)=X(L)T(t)=0

    (X(0)X(L))T(t)=0

    T0 or X(0)=X(L)

    若T为0函数,则u(x,t)也为0函数,所以我们希望取X(0)=X(L)=0

    把Boundry condition与ODE结合起来得到一个BVP - Boundry Value Problem

    X(x)+λX(x)=0,X(0)=X(L)=0

    目的:For what values of λ, the BVP has non-trivial solutions?

    Non-trivial solutions are called eignfunctions, the special values are called eigenvalues

    假设X(x)=erx,characteristic equation: r2+λ=0,求解constant coefficient secondary linear DE

    对不同λ 取值分类讨论

    λ<0, Distinct Real roots

    X(x)=c1eλx+c2eλx

    X(0)=c1+c2=0X(L)=c1eλL+c2eλL=c1(eλLeλL)=0

    c1=c2=0X0,trivial

    λ=0, Repeated Real root

    X(x)=c1+c2x

    X(0)=c1=0X(L)=c2L=0c2=0

    X0,trivial

    λ>0, Complex conjugate roots

    X(x)=c1cos(λx)+c2sin(λx)

    X(0)=c1=0X(L)=c2sin(λL)=0

    c2=0 or sin(λL)=0, for non-trivial solutions, we want the latter

     

    Eignvalue sin(λL)=0λL=nπλ=(nπL)2

    X(x)=c2sin(λx)Xn(x)=ansin(nπxL)

     

    代入T(t)+βλT(t)=0

    T(t)+β(nπL)2T(t)=0Tn(t)=bneβ(nπL)2t

     

    un(x,t)=Xn(x)Tn(t)=ansin(nπxL)bneβ(nπL)2t

    cn=anbn

    u(x,t)=Σn=1cneβ(nπL)2tsin(nπxL)

    为什么要 求和?:对于任何满足要求的X(x),都可以在任意的频率上有任意的系数同时满足ODE,可以理解为每个n代表着一个null space的一个basis vector,而求和则是linear combination

    最后求solution,只需把u(x,0)=f(x)代入后,计算每个n对应的cn

    u(x,0)=Σn=1cnsin(nπxL)

    The wave equation

    跟Heat equation 类似,但由于PDE两边都是双重导数,有略微差别

    PDE: utt=α2uxx,0<x<L,t>0

    Boundry Conditions: u(0,t)=u(L,t)=0,t0

    Initial Conditions: u(x,0)=f(x),ut(x,0)=g(x)

    同样使用separation of variables, u(x,t)=X(x)T(t)

    ut=βuxxX(x)T(t)=α2X(x)T(t)

    两个ODE:

    X(x)+λX(x)=0

    T(t)+λα2T(t)=0

    Boundry Condition 与上面Heat equation的相同,同时对于X的ODE也相同,因此eignvalue λ=(nπL)2

    Xn(x)=cnsin(nπxL)

    T(t)+(nπL)2α2T(t)=0

    characteristic equation: r2+(nπαL)2=0, complex conjugate roots

    Tn(t)=cn,1cos[(nπαL)t]+cn,2sin[(nπαL)t]

     

    un(x,t)=cnsin(nπxL)[cn,1cos[(nπαL)t]+cn,2sin[(nπαL)t]]

    an=cncn,1,bn=cncn,2

    u(x,t)=Σn=1[ancos[(nπαL)t]+bnsin[(nπαL)t]]sin(nπxL)

    然后代入两个Initial Condition即可得到Solution

    u(x,0)=Σn=1ansin(nπxL)

    ut(x,t)=Σn=1[an(nπαL)sin[(nπαL)t]+bn(nπαL)cos[(nπαL)t]]sin(nπxL)

    ut(x,0)=Σn=1bn(nπαL)sin(nπxL)=Σn=1Bnsin(nπxL)

    Fourier Sin and Cos Functions

    从上面两个问题的解可以看出来,这种PDE求解后都需要将f(x)变为只含有sin的series

    2L-period extensions

    令2L = T

    Odd 2L-period extensionfo(x)={f(x)0<x<Lf(x)L<x<0Even 2L-period extensionfe(x)={f(x)0<x<Lf(x)L<x<0
    Fourier sine series

    For odd function fo(x)

    fo(x)=Σn=1bnsin(nπxL)

    bn=1LLLfo(x)sin(nπxL)dx=2L0Lf(x)sin(nπxL)dx

    由于剩下两个项都是偶函数,不能出现在odd function的transform里,所以a0=an=0

    (odd)(odd) = (even) (Even)(even) = (even) (odd)(even) = (odd)

    aa(odd)=0 aa(even)=20a(even)

    Fourier cosine series

    fe(x)=a02+Σn=1ancos(nπxL)

    an=1LLLfe(x)cos(nπxL)dx=2L0Lf(x)cos(nπxL)dx

    a0 只要代入n = 0, a0=2L0Lf(x)dx

    Convergence of Fourier Series

    [Theorem - pointwise convergence] If f,f are piecewise continuous on [L,L], then for any x in (L,L)

    a02+Σm=1[amcos(mπxL)+bmsin(mπxL)]=12[f(x+)+f(x)]

    For x=±L, the series converges to 12[f(L+)+f(L)]

    如果一个函数有间断点,那么fourier series在间断点会converge到中间点

    Screen Shot 2023-04-01 at 7.47.11 PM

    [Theorem] Let f be a continuous function on (,), and periodic of period 2L. f is piecewise continuous on [L,L], then the Fourier series for f converges uniformly to f on [L,L] and hence on any interval.

    Converge uniformly 的意思:

    ϵ>0,N0N such that NN0|f(x)[a02+Σm=1N[amcos(mπxL)+bmsin(mπxL)]]|<ϵ

    Screen Shot 2023-04-01 at 7.52.30 PM

    只要N足够大,converge的误差越小

    [Proposition - Weierstrass m-test] If |an(x)|Mn for all x[a,b], and Σn=1Mn converges , then Σn=1an(x) converges uniformly on [a,b], with sum f(x)

    A test for proving that a series of functions converges uniformly on an interval

    有点像infinite series的comparison test?

    Gibbs Phenomenon

    Near poinst of discontinuity of f, the Fourier series may overshoot by approximately 9% of the jump regardless of N.

    Screen Shot 2023-04-01 at 7.56.26 PM

    Differentiation and Integration of Fourier Series

    对于不连续的函数,求导后会出现无穷大的值,导致fourier series 无法converge,因此做出如下限制条件

    [Theorem] Let f be continuous on (,) and 2L-periodic. Let f(x),f(x) be piecewise continuous on [L,L]. Then, the fourier series for f(x) by termwise differentiation.

    f(x)=a02+Σn=1[ancos(nπxL)+bnsin(nπxL)]f(x)Σn=1πnL[ansin(nπxL)+bncos(nπxL)]

    为何要对f''(x) 有要求?

    对于求积分,则要求没那么严格

    [Theorem] Let f(x) be piecewise continuous on [L,L] with Fourier series

    f(x)a02+Σn=1[ancos(nπxL)+bnsin(nπxL)]Lxf(t)dt=Lxa02dt+Σn=1xLx[ancos(nπxL)+bnsin(nπxL)]

    Complex Form of Fourier Series

    由欧拉定理可得 ejθ=cosθ+isinθ, 因此有

    sin(nπxL)=12j(ej(nπxL))ej(nπxL))

    cos(nπxL)=12(ej(nπxL))+ej(nπxL))

    对原式进行重组

    f(x)=a02+Σn=1[amncos(nπxL)+bnsin(nπxL)]=a02+Σn=1[an12(ej(nπxL))+ej(nπxL))+bn12j(ej(nπxL))ej(nπxL)))]=a02+12Σn=1[(an+bnj)ejnπxL+(anbnj)ejnπxL]=a02+12Σn=1[(anjbn)ejnπxL+(an+jbn)ejnπxL]

    cn=anjbn2, 则cn=an+jbn2

    an=an, bn=bn,因此cn=anjbn2=an+jbn2=cn

    注:当n=0时,c0=a0jb02=a02

    b0 为0,可以从b0的积分公式中得到,另一角度,an是偶函数,而bn是🐔函数

    c0在某些情况下不能使用cn 的通项公式,需要通过c0=12LLLf(x)dx求得,再次印证了c0=a02

    注意complex form和real form的常数项是相同的,complex form常数项是c0,而real form是a02

    an,bn,cn相互转换时

    an=cn+cn

    bn=j(cncn)

    cn=anjbn2

    原式变为

    f(x)=Σn=1cnejnπxL+c0+Σn=1cnejnπxLf(x)=Σn=cnejnπxL

    这就是complex form of fourier series

    |cn| : Amplitude, |ϕn|=|jnπxL|: phase shift of n-th harmonic

    类比电路的phasor representation

    cn可以通过之前an,bn的公式推导得出

    cn=anjbn2=12LLLf(x)cos(nπxL)dxj2LLLf(x)sin(nπxL)dx=12LLLf(x)[cos(nπxL)jsin(nπxL)]dx=12LLLf(x)ejnπxLdx

    Parseval's Theorem

    To measure the strength of a signal

    Time domain: 12LLL[f(t)]2dt

    Frequency domain: Σn=|cn|2

    [Parseval's Theorem] If a 2L-periodic function f(t) has complex Fourier series f(x)=Σn=cnejnπxL, then

    12LLL[f(t)]2dt=Σn=|cn|2

    Fourier Transform

    将Fourier series的思想拓展到non-periodic functions f

    f(x) 为任意function,fL(x)f的2L-periodic extension

    Screen Shot 2023-04-03 at 5.22.07 PM

    对原来的fourier series进行换元,ωn=nπLΔω=πLΔω2π=12L

    定义F(ωn)=LLfL(t)ejωntdt

    那么fL(t)=Σn=12LF(ωn)ejωnt=12πΣn=F(ωn)ejωntΔω

    当我们取L趋近于无限大时(不再period extend),limLfL(t)=f(t)Δω=πL0

    f(t)=limLfL(t)=12πlimΔω0Σn=F(ωn)ejωntΔω=12πF(ω)ejωtdω

    F(ω)=f(t)ejωtdt

    由此,定义Fourier Transform

    F{f(t)}=f(t)ejωtdt

    F1{f^(ω)}=12πf^(ω)ejωtdω

     

    Convergence of Fourier Transform

    [Theorem] If function f(t) is such that

    a) is absolutely integrable, so that |f(t)|dt<

    b) has at most a finite number of maxima, minima and discontinuities in any interval

    Then the Fourier integral representation of f(t) converges to f(t) at all points where it is continuous and to 12[f(t)+f(t+)] where f(t) is discontinuous

     

    Properties of Fourier Transform

    Assume F{f(t)}=f^(ω)

    Linearity

    F{cf+g}=cF{f}+F{g}

    Scaling

    F{f(at)}=1af^(ωa)

    Frequency shifting property

    F{ejatf(t)}=f^(ωa)

    Time Shifting Property

    F{f(ta)}=ejaωf^(ω)

    n Derivative

    F{f(n)(t)}=(jω)nf^(ω)

    t^n f(t)

    F{tnf(t)}=jndndωnf^(ω)

    Symmetry/Duality

    F{f^(t)}=2πf(ω)