Definitions of Differential Equations
Differential Equations: Equations that involve derivatives
Examples:dtdx+x=2cos(t)dt2d2x+dtdx−x=0
In these examples, x is dependent on t; can be considered a function. On the other hand, t is an independent variable. Differential equations can also include parameters which are constants/coefficients.
Is x=cost+sint a solution to dtdx+x=2cost?dtdx+x=dtd(cost+sint)+cost+sint=(−sint+cost)+cost+sint=2costThus, x is a solution to the equation, and there are many other x that are solutions as well.
-
Ordinary differential equation: A differential equation with only one independent varialbe
-
Partial differential equation: A differential equation with several independent variables, using partial derivatives
- $\frac{\partial u}{\partial x} + \frac{\partial u}{\partial y} + \frac{\partial u}{\partial z} = 1$
-
Linearity: An equation is linear if and only if the dependent variables and their derivatives appear linearly
- Linear: $\frac{dx}{dt} + t = 0 \text{ and } \frac{dx}{dt} + sin t = 0$
- Nonlinear: $e^{dx / dt} = 0 \text{ and } e^x \frac{dx}{dt} + t = 0$
-
Homogeneity: A linear equation is homogeneous if all terms depend on the dependent variable. Otherwise, it is non- or inhomogeneous
- Homogeneous: $\frac{d^2x}{dt^2} + e^t \frac{dx}{dt} + x = 0$
- Inhomogeneous: $\frac{d^2x}{dt^2} - 2 \frac{dx}{dt} + t = 0$
-
Constant Coefficients: A linear equation has constant coefficients if the coefficients are all constants (except for the inhomogeneity)
- Example: $5\frac{d^3x}{dt^3} + 4\frac{dx}{dt} + sin(t)cos(t) = 0$
-
Autonomy: An equation is autonomous if the equation does not depend on the independent variable at all
- Autonomous: $e^x\frac{dx}{dt} + x = 0$
- Not autonomous: $\frac{d^2x}{dt^2} + sint = 0$
Solving First Order ODEs
Case 1: f only depends on x
Given an equation like y′=f(x), we can use the anti-derivative to solve.∫y′dx=∫f(x)dxy(x)=∫f(x)dx+CWe can get rid of the constant given an initial value for y(c) where c is some constant; known as an IVP.
Case 2: f only depends on y
Equation: y′=f(y)Note that y′=dxdy=f(y). Therefore:dxdy=f(y)→dydx=f(y)1Then, we can use the same method as Case 1, but we set x as the dependent variable and then solve for y.
- Can also be morphed into case 3
Case 3: f is depends on x and y (Separable)
Equation: y′=h(x)g(y)dxdy=h(x)g(y)g(y)dy=h(x)dx∫g(y)1dy=∫h(x)dx+CNote that we might not get a clean definition of y. We can leave y in a more complex form as an implicit solution.
Example:dxdy=xyydy=xdx∫y1dy=∫xdxln∣y∣=21x2+C∣y∣=e21x2+Cy=±eCe21x2→y=Ce21x2
Newton’s Cooling Law Example:T(0)=89,T(1)=85,A=22dtdT=−k(T−A)=−kT+kA=−kT+22k−k(T−22)1dT=dt−t+C=k1ln∣(T−A)∣∣(T−A)∣=e−kt+C=Ce−ktk(T−A)=Ce−ktGeneral solution: T=Ce−kt+A89=C+22→C=6785=67e−k+22→k=−ln(63/67)T(t)=67eln(63/67)t+2260=67eln(63/67)t+22→t≈9.21 minutes
First Order Linear ODEs
Given the following sample linear ODE: a1(x)y′+a0(x)y=b(x)
- If b(x) = 0, then the equation is homogenous
- If b(x) != 0, then the equation is inhomogeneous
- When $a_1(x) \neq 0$, then we can simplify this as $y’ + \frac{a_0(x)}{a_1(x)}y = \frac{b_0(x)}{a_1(x)} \rightarrow y’ + p(x)y = f(x)$
- If p(x) = 0, then $y’ = f(x)$ which is the same as Case 1
- If f(x) = 0, then $y’ + p(x)y = 0$ which can be written as a separable equation; Case 3
- If p and f are nonzero, then $y’ + p(x)y = f(x)$
y′+p(x)y=f(x)To solve, we want to find a factor r(x) such that r(x)(y′+p(x)y)=r(x)f(x)→dxd(r(x)y)r(x)y=∫r(x)f(x)dx+Cy=r(x)−1(∫r(x)f(x)dx+C)Finding r(x):r(x)(y′+p(x)y)=dxd(r(x)y)=dxdry+r(x)dxdyr(x)p(x)y=dxdry→dxdr=r(x)p(x) (Separable equation)r1dr=p(x)dxr=Ce∫p(x)dx, AKA the integrating factor
Examples
y′+2xy=ex−x2r(x)=e∫2xdx=ex2ex2(y′+2xy)=dxd(ex2y)=ex2ex−x2=exex2y=ex+C→y=ex−x2+ex2C (General Solution)−1=1+1C→C=−2y=ex−x2−ex22 (Particular Solution)
x1dxdy−x22y=xcos(x)dxdy−x2y=x2cos(x)r(x)=e∫p(x)dx=e−2ln∣x∣=eln(∣x∣)−2=x21dxd[x21y]=x21x2cos(x)=cos(x)x21y=sinx+C→y=x2(sin(x)+C)
Substitution
Example: y′=(x+y+1)2Let u=x+y+1→u(x)=x+y(x)+1dxdu=u′=(x+y+1)′=1+y′y′=u′−1New equation: u′−1=u2→dxdu=u2+1Degenerates into case 2: dudx=u2+11x=∫u2+11du+Cx=arctan(u)+C→u=tan(x−C)=tan(x+C)y=tan(x+C)−x−1
Form |
Method |
Replacement |
$yy’$ |
$u = y^2, u’ = 2yy’$ |
$yy’ = \frac{1}{2}u’$ |
$y^2y’$ |
$u = y^3, u’ = 3y^2y’$ |
$y^2y’ = \frac{1}{3}u’$ |
$cos(y)y’$ |
$u = sin(y), u’ = cos(y)y’$ |
$cos(y)y’ = u’$ |
$sin(y)y’$ |
$u = cos(y), u’ = -sin(y)y’$ |
$sin(y)y’ = -u’$ |
$e^yy’$ |
$u = e^y, u’ = e^yy’$ |
$e^yy’ = u’ $ |
2yy′+1=y2+xLetu=y2u′=2yy′u′+1=u+x→u′−u=x−1dxd[e−xu]=e−x(x−1)e−xu=∫e−x(x−1)dx+C=−e−x(x−1)−∫−e−xdx+C=−e−x(x−1)−e−x+Cu=−(x−1)−1+Cex=−x+Cexy=±(−x+Cex)0.5
- Bernoulli equation is the first-order ODE of the form $y’ + p(x)y = q(x)y^n$
- For n > 2, this equation would not be linear
- Strategy: multiply the entire equation by $y^{-n}$ to turn it into $y^{-n}y’ + p(x)y^{1-n} = q(x)$
- Substitute using $u = y^{1-n}, u’ = (1-n)y^{-n}y’$
Homogenous Equations
- Homogenous equations can be given by the form $\frac{dy}{dx} = F(\frac{y}{x})$
- Can be solved using a substitution $u = \frac{y}{x}$
- $\frac{dy}{dx} = F(\frac{y}{x})$ becomes $u + xu’ + F(u)$
- This new equation is separable; $\frac{1}{F(u) - u}du = \frac{1}{x}dx$
Example
x2y′=y2+xy, y(1)=1y′=x2y2+xyu=xy,y′=u+xu′u+xu′=u+u2xu′=u2u−2du=x−1dx−u1=ln∣x∣+Cu=−ln∣x∣+C1xy=−ln∣x∣+C1y=−ln∣x∣+Cx1=−C1→C=−1y=−ln∣x∣−1x
Autonomous Equations
- Autonomous equations are given by $y’ = f(y)$
- A critical point of $x’ = f(x)$ is defined as a point $x_0$ such that $f(x) = 0$
- A solution $x(t)$ of $x’ = f(x)$ is called an equilibrium solution if $x(t) = x_0$
- For example, the critical points of $x’ = x(3 - x)$ are 0 and 3, so the equilibrium solutions are $x(t) = 3, x(t) = 5$
Slope Fields
-
Slope fields are drawn by calculating the slope at different points and drawing them
- Given an equation $y’ = f(x, y)$, find the slope of y at various points and draw the slope as a line segment
- Slope fields can be used to determine the shapes of solutions depending on an initial value
- There are various functions that you can find from a slope field; how do we know if a function exists or is unique?
Picard’s Theorem
Definition. Consider the initial value problem y′=f(x,y),y(x0)=y0If the following two conditions are met:f(x,y) is continuous near (x0,y0)∂y∂f exists and is continuous near (x0,y0)then a solution to this IVP exists and is unique for (at least) some x near (x0,y0)
Higher Order Linear ODEs
Inhomogenous
These functions take the form of ${a_ny^{(n)} + a_{n-1}y^{(n-1)} + … + a_1y’ + a_0y = f(x)}$. Note that you need one particular solution and one general solution, and the general solution can be found by setting the right hand side to 0; this degenerates the ODE to a homogenous equation.
Undetermined Coefficients
In order to find a particular solution, we can plug in different forms of solutions and find the coefficients that make the form true. These strategies involve adding factors of x such that the form is not a solution to the homogenous ODE.
f(x) is a polynomial
Given a d degree polynomial, the particular solution will take the form of ${y_p = (a_dx^d + … + a_1x + a_0)x^s}$ where s is the multiplicity of the root $r=0$.
f(x) is exponential
The particular solution will take the form of $y_p = ax^se^{kx}$, where s is the multiplicity of the root k in the characteristic equation and a is to be found.
f(x) is trigonometric
The particular solution will take the form of $y_p = (ae^{\alpha x}\cos \beta x + be^{\alpha x}\sin \beta x)x^s$, where s is the multiplicity of the complex root $\alpha \pm \beta i$.
Example:
y′′+y′=2cosxyc=C1+C2e−xyp=acosx+bsinxyp′=−asinx+bcosxyp′′=−acosx−bsinxyp′′+yp′=(−a+b)cosx+(−a−b)sinx=2cosx+0sinxa=−1, b=1yp=−cosx+sinx
Combinations
If the right hand side is given by $f(x) + g(x)$ and $y_f$ solves $Ly = f(x)$ and $y_g$ solves $Ly = g(x)$, then $y_p = y_g + y_f$ is a particular solution.
Systems of ODEs
- A system of differential equations is a finite set of diff. eqs.
- Systems can obey different properties depending on whether or not all ODEs have that property; e.g. if all ODEs are linear, then the system is linear
- The highest order in any ODE defines the order of the system
- In this course, we will have the number of equations equal to the number of dependent variables
First-Order
- Form: $y_1’ = g_1(y_1, y_2, \cdots, y_n, x), \cdots, y_n’ = g_n(y_1, y_2, \cdots, y_n, x)$
- We can convert an ODE with one dependent of nth order to a system of ODEs with n dependent variables of first order
- Ex. $y’’’ - y’’ + 2y = 1$ can be converted to ${u_3’ - u_3 + 2u_1 = 1\, u_2’ = u_3, u_1’ = u_2 }$, where ${u_3 = y’’}, {u_2 = y’}, {u_1 = y}$
- General strategy: given $y^{(n)} = F(y^{(n-1)}, \cdots, y’, y, x)$, convert using $u_1 = y, u_2 = y’, \cdots, u_n = y^{(n-1)}$ and $u_1’ = u_2, \cdots, u_{n-1}’ = u_n, u_{n}’ = F(u_n, \cdots, u_1, x)$
- Used to convert systems to nth order linear ODEs