# CS2001 工程數學 Engineering Mathematics Textbook: Kreyszig, E. *Advanced Engineering Mathematics*. John Wiley & Sons, Inc. Instructor: 賓拿雅 Binayak Kar # Ordinary Differential Equations (ODEs) * ODE: differential equations that depend on a single variable * Modeling: a crucial feneral process that translates a physical situation or some other observations into a "mathematical model" ## 第1章 一階常微分方程式 ### Sec. 1.1 Basic Concepts. Modeling * differential equation: an equation containing derivatives of an unknown function * order $n$: $n$th derivative of the unknown function y is the highest derivative * first-order ODEs * $F(x,y,y')=0$ * $y'=f(x,y)$ #### Concept of Solution * solution: is defined and differentiable thoughout the interval and is such that the equation becomes an identity if $y$ and $y'$ are replaced by $h$ and $h'$ * solution curve: the curve of $h$ * ***the*** general solution: solution containing an arbitrary constant $c$ * develop methods that will gave general solution *uniquely* * particular solution: choose a specific $c$ #### Initial Value Problem * a problem with initial condition * initial condition $y(x_0)=y_0$ #### More on Modeling * STATE 1: Physical System * Step 1: Modeling * transit from the physical situation to mathematical method * physical situation: engineering problem, physical problem * mathmatical expressions * variables * functions * equations * STATE 2: Mathematical Model * Step 2: Solving * solve by mathematical method * ODEs * STATE 3: Mathematical Solution * (Varify the solution) * *Step 3: Interpreting* * interpret result to physical * STATE 4: Physical Interpretation ### Sec. 1.2 Geometric Meaning of $y'=f(x,y)$. Direction Fields, Euler's Method - $y'(x_0)=f(x_0,y_0)$ - Graphic Method of Direction Fields - show direction of solution curves of a given ODE by drawing short stright-line segments in the $xy$-plane - isocline: curve of equal inclination #### Numeric Method by Euler - $y_n=y_{n-1}+hf(x_{n-1},y_{n-1})$ ### Sec. 1.3 Separable ODEs. Modeling - method of separating variables 1. $g(y)y'=f(x)$ (separable equation) 2. $\int g(y)y'dx=\int f(x)dx+c$ 3. $\int g(y)dy=\int f(x)dx+c$ - $f$ and $g$ must be continuous #### Extended Method: Reduction to Separable Form - special case: $y'=f(\frac yx)$ (sometimes called homogeneous ODEs) 1. Let $y=ux$ and $y'=u'x+u$ 2. $u'x+u=f(u)$ 3. $\dfrac{du}{f(u)-u}=\dfrac{dx}x$ ### Sec. 1.4 Exact ODEs. Integrating Factor - **exact differential equation:** $M(x,y)dx+N(x,y)dy=0$ and differential form $du=\dfrac{\partial u}{\partial x}dx+\dfrac{\partial u}{\partial y}dy=0$ - **implicit solution** $u(x,y)=c$ 1. check differential form: $\dfrac{\partial M}{\partial y}=\dfrac{\partial^2u}{\partial x\partial y}=\dfrac{\partial N}{\partial x}$ 2. $u=\int Mdx+k(y)=\int Ndy+l(x)$ 3. $\dfrac{\partial u}{\partial y}=\dfrac\partial{\partial y}\int Mdx+\dfrac{dk}{dy}=N$ or $\dfrac{\partial u}{\partial x}=\dfrac\partial{\partial x}\int Ndy+\dfrac{dl}{dx}=M$ 4. $k=\int dk=\int(N-\dfrac\partial{\partial y}\int Mdx)dy$ or $l=\int dl=\int(M-\dfrac\partial{\partial x}\int Ndy)dx$ #### Reduction to Exact Form. Integrating Factors - if differential form is not exact? - multiply the nonexact equation - $FPdx+FQdy=0$ - $F$ is called **integrating factor** #### How to Find Integrating Factors 1. $R=\dfrac1Q(\dfrac{\partial P}{\partial y}-\dfrac{\partial Q}{\partial x})$ 2. if $R$ depends only on $x$, $F=e^{\int Rdx}$ if $R$ depends only on $y$, $F=e^{\int Rdy}$ ### Sec. 1.5 Linear ODEs. Bernoulli Equation. Population Dynamics - **linear:** if can brought into the $y'+p(x)y=r(x)$ form - if not, it is nonlinear - $p$ and $r$ may be ***any*** functions of $x$ - In enginerring, $r$ is called the input, $y(x)$ is called output or response - **Homogeneous Linear ODE:** $y'+p(x)y=0$ - general solution: $y(x)=ce^{-\int p(x)dx}$ - trivial solution: $y(x)=0$ - **Nonhomogeneous Linear ODE:** - multiply the nonhomogeneous equation - $F=\int pdx$ - general solution: $y(x)=F^{-1}(\int Frdx+c)$ - Total Output = Response to the Input + Response to the Initial Data #### Reduction to Linear Form. Bernoulli Equation - **Bernoulli equation:** $y'+p(x)y=g(x)y^a$ - if $a=0$ or $a=1$, equation is linear - set $u(x)=[y(x)]^{1-a}$ - get $u'+(1-a)pu=(1-a)g$ #### Population Dynamics ## 第2章 二階線性常微分方程式 ### Sec. 2.1 Homogeneous Linear ODEs of Second Order * **linear:** $y''+p(x)y'+q(x)y=r(x)$ * **homogenous:** $r(x)=0$ * $p$, $q$: coefficients * soulution: $y=h(x)$ #### Homogeneous Linear ODEs: Superposition Principle * **superposition principle**/**linearity principle** * for a homogeneous linear ODE, any linear combination of two solutions on an open interval I is again a solution on interval I. * sums and constant multiples of solutions also are solutions. * PROOF * let $y_1$ and $y_2$ be solution on I. * substitute $y=c_1y_1+c_2y_2$ * we get $y''+py'+qy=(c_1y_1+c_2y_2)''+p(c_1y_1+c_2y_2)'+q(c_1y_1+c_2y_2)$ $=c_1y_1''+c_2y_2''+p(c_1y_1'+c_2y_2')+q(c_1y_1+c_2y_2)$ $=c_1(y_1''+py_1'+qy_1)+c_2(y_2''+py_2'+qy_2)=0$ * this theorem **does not hold** for *++nonhomogeneous++ linear* or *++nonlinear++* ODEs #### Initial Value Problem. Basis. General Solution * two initial conditions: $y(x_0)=K_0$ , $y'(x_0)=K_1$ * use condition to determine $c_1$ and $c_2$, get a **particular solution** ### Sec. 2.2 Homogeneous Lineat ODEs with Constant Coefficients * $y''+ay'+by=0$ * $a$ and $b$ are constant * ### Sec. 2.3 Differential Operators. *Optional* 補 ### Sec. 2.5 Euler-Cauchy Equations 1. **Euler-Cauchy equation** (problem) $x^2y''+axy'+by=0$ 2. substitute $y=x^m$ 3. **auxiliary equation** $m^2+(a-1)m+b=0$ * **Case Ⅰ.** Real different roots $m=m_1,m_2$ * $y=c_1x^{m_1}+c_2x^{m_2}$ * **Case Ⅱ.** A real double root $m=m$ * $y=(c_1+c_2\ln x)x^m$ * Case Ⅲ. Complex conjugate roots $m=r\pm\omega i$ * $y=x^r[A\cos(\omega\ln x)+B\sin(\omega\ln x)]$ ### Sec. 2.6 Existence and Uniqueness of Solutions. Wronskian #### Linear Independence of Solutions * linear independent: $k_1y_1(x)+k_2y_2(x)=0$ * linear dependent: $y_1=ky_2$ * **Linear Dependence and Independence of Solutions** * Let the homogeneous linear ODE have continuous coefficients $p(x)$ and $q(x)$ on an open interval $I$. Then two solutions $y_1$ and $y_2$ of the ODE on $I$ are linearly dependent on $I$ iif their *Wronski determinant* **(Wronskian)** $W(y_1,y_2)=\left|\begin{matrix}y_1&y_2\\y_1'&y_2'\\\end{matrix}\right|=y_1y_2'-y_2y_1'=0$ ; hence, *if there is an $x1$ in $I$ at which $W$ is not 0, then $y1,y2$ are linearly independent on $I$* #### A General Solution of (1) Includes All Solutions ### Sec. 2.7 Nonhomogeneous ODEs * $y''+p(x)y'+q(x)y=r(x)$ * general solution: $y(x)=y_h(x)+y_p(x)$ * $y_h(x)=c_1y_1(x)+c_2y_2(x)$ (general solution of the homogeneous ODE $r(x)=0$) * $y_p(x)$ particular solution #### Method of Undertermined Coefficients | Term in $r(x)$ | Choice for $y_p(x)$ | | -------------------------------------------------------- | ------------------------------------------- | | $ke^{\gamma x}$ | $Ce^{\gamma x}$ | | $kx^n$ | $K_nx^n+K_{n-1}x^{n-1}+...+K_1x+K_0$ | | $k\cos\omega x$, $k\sin\omega x$ | $K\cos\omega x+M\sin\omega x$ | | $ke^{\alpha x}\cos\omega x$, $ke^{\alpha x}\sin\omega x$ | $e^{\alpha x}(K\cos\omega x+M\sin\omega x)$ | * Choice Rules * **Basic Rule** * **Modification Rule** (as double root) * **Sum Rule** (sum of two choice) ### Sec. 2.10 Solution by Variation of Parameters * $y_p(x)=-y_1\int\dfrac{y_2r}Wdx+y_2\int\dfrac{y_1r}Wdx$ #### Idea of the Method. Derivation of (2) 證明,補 ## 第3章 高階線性常微分方程式 ### Sec. 3.1 Homogeneous Linear ODEs ### Sec. 3.2 Homogeneous Linear ODEs with Constant Coefficients ### Sec. 3.3 Nonhomogeneous Linear ODEs ## 第6章 拉普拉斯轉換