01. Introduction
May 2 Lecture
What is an ODE?¶
An ODE (ordinary differential equation) is an equation which connects a function \(y(x)\) with its derivative(s) and with \(x\).
Example of an ODE
A solution of an ODE is a function \(y(x)\) which satisfies the ODE.
Solutions of an ODE
Solutions to ODE
- Constant solution:
If \(y(x)=k\) (a constant), then \(y\p=0\).
- Claim: \(y(x)=5e^{2x}-\frac32\) is a solution.
Check:
Definition: Equilibrium Solution
A constant solution to an ODE is called an equilibrium solution
Definition: General Solution
The general solution of an ODE is the set of all solutions to the ODE, and usually can be expressed using one or two constants.
In the above example, the general solution is \(y(x)=Ce^{2x}-\frac32\).
Defintion: Initial Condition
If we are given an initial condition (also called boundary condition) of the form \(y(a)=b\), there is only one specific solution which satisfies the ODE together with the initial condition.
A pair of an ODE with an Initial Condition is called an Initial-Value Problem.
Example of Initial Condition
ODE: \(y\p=2x+3\)
Initial Condition: \(y(0)=7\)
General Solution of ODE is: \(y(x)=Ce^{2x}-\frac32\) (as shown above)
Plug in boundary condition to find \(C\):
Solution: \(y(x)=8.5\cdot e^{2x}-\frac32\)
The order of an ODE is the number of the highest derivative of \(y\) appearing in the ODE.
In general, the order of the ODE is also how many constants the general solution will contain, and also the number of initial conditions you need to arrive at a specific solution.
How to Solve the ODE y’=ky¶
where \(k\) is a non-zero fixed constant.
Note that this ODE has an equilibrium solution: \(y(x)=0\).
Otherwise (assuming \(y(x)\not=0\)), divide by \(y\):
Since \(\frac {y\p}y\) is a derivative of \(\ln (y)\), take the integral of both sides:
Including the equilibrium solution at \(y=0\), we get the general solution of the ODE \(y\p=ky\):
Neat Trick
When integrating a term with \(y\p\) with respect to \(x\), you can pull out the \(y\p\) and integrate w.r.t. \(y\). For example, \(\int\frac {y\p}ydx=\int \frac1ydy\).
In general: