Linear Ordinary Differential Equations
(Linear ODEs)
A first order differential equation is called linear if it is of the form dydx+P(x)y=Q(x). The functions P(x) and Q(x) can be complicated (even non-linear!), but the left hand side is a linear function of y.
Example: In the video below we find the solution of the initial-value problem
dydx=x+y,y(0)=0.
|
The solution of a general linear ODE follows the same steps, which we can summarize as follows:
- Write the equation in standard form dydx−y=x.
- Multiply both sides by e−x. This is called an integrating factor. We now have e−x(y′−y)=xe−x.
- Notice that the derivative of ye−x is y′e−x−ye−x by the product rule.
- Rewrite our equation as (ye−x)′=xe−x.
- Integrate both sides. Doing the right hand side involves integration by parts. The result is ye−x=−(x+1)e−x+C,
or, equivalently, y=−(x+1)+Cex.
- Plug in the initial condition y(0)=0 to figure out C. Here C=1.
- Get the final answer:
y=ex−x−1.
|
|