So far we've only encountered one class of differential equations for which we have a method of algebraic solution: separable differential equations. [br][br]We are now going to look at linear differential equations. There is some overlap between linear and separable differential equations, but as we'll see, the algebraic method for solving linear differential equations is considerably different than that of separable differential equations. [br][br][b][u]Definition[/u][/b]: A (first order) [b]linear differential equation[/b] is a differential equation that can be put into the standard (linear) form[br][br][math]\frac{dy}{dx}+p\left(x\right)y=g\left(x\right)[/math][br][br]where [math]p(x)[/math] and [math]g(x)[/math] are both continuous functions. [br][br]You will often see other letters used for the dependent ([i]y[/i]) and independent ([i]x[/i]) variables. Mostly commonly, you might see [i]t[/i] used for the independent variable instead of [i]x[/i]. [br][br]You can read a standard textbook treatment on linear differential equations [url=https://tutorial.math.lamar.edu/classes/de/linear.aspx]here[/url]. The standard textbook treatment discusses something called an "integrating factor" which we will discuss later as an alternate method for solution. But for now we'll keep it slightly simpler.
Consider this differential equation and initial condition in the dependent variable, [i]v[/i], and the independent variable, [i]t[/i]. [br][br][math]\frac{dv}{dt}=9.8-0.196v;v\left(0\right)=48[/math][br][br]This is a linear differential equation. The reason is that if you add 0.196[i]v[/i] to each side, the differential equation is now in standard (linear) form [br][br][math]\frac{dv}{dt}+0.196v=9.8[/math][br][br]In this form, the two functions mentioned in the standard form are [math]p(t)=+0.196[/math] and [math]g(t)=9.8[/math]. I added the "+" in front of 0.196 for emphasis since it's a really common mistake to get crossed up on negative signs when putting a linear equation in standard form. Also, note that [i]p[/i]([i]t[/i]) does NOT include [i]v[/i]![br][br]Let's look the slope field of the equation along with the initial condition. Note that in order to view the slope field, we need the equation in slope field form (which means solving it for [i]dv[/i]/[i]dt[/i], or in other words, leaving it as we originally found it).
The algebraic method for solving linear differential equations is a perennial bane of mathematics students the world over. I present to you what I believe to be the best path forward:[br][list=1][*]First I will present the formula for solving these in an entirely unmotivated way. The formula tells you precisely what integrals to calculate and how to put them together to produce an algebraic solution of any linear differential equation. The reason why this formula fails is if you are unable to do the integrals in the formula. That said, we'll start out with "easy" integrals, and so this formula will "get the job done" but won't give you much insight into why it works. [/*][*]After we get to know the formula today, I'll ask you to read about why it works, and then next class we will investigate further why it works. [/*][/list]So... here is the formula:[br][br][b]The formula: [/b]To solve a linear differential equation in standard (linear) form[br][br][math]\frac{dy}{dx}+p\left(x\right)y=g\left(x\right)[/math][br][br]use the following formula:[br][br][math]y\left(x\right)=\frac{\int e^{\int p\left(x\right)dx}g\left(x\right)dx+c}{e^{\int p\left(x\right)dx}}[/math][br][br]In practice, what this formula directs you to do is as follows:[br][list=1][*]Calculate [math]\int p\left(x\right)dx[/math] [WARNING: could be a very hard Calc 1 or 2 integral!][br][/*][*]Raise the result of step 1 to the [i]e[/i]. This is often referred to as the "integrating factor" [math]\mu\left(x\right)[/math][br][/*][*]Plug the result of step 2 into the appropriate places of the formula.[/*][*]Calculate the last integral, [math]\int e^{\int p\left(x\right)dx}g\left(x\right)dx[/math] [WARNING: this could also be a very hard Calc 1 or 2 integral!][br][/*][*]Plug the result of step 4 into the appropriate place in the formula, and simplify [WARNING: This could be very hard Algebra 1 or 2!][/*][*]If an initial condition is present, solve for [i]c[/i] to satisfy the initial condition. [br][br][br][/*][/list]
Let's return to [br][br][math]\frac{dv}{dt}+0.196v=9.8;y\left(0\right)=48[/math][br][br]As discussed above, [math]p(t)=+0.196[/math] and [math]g(t)=9.8[/math]. With the linear differential equation in standard (linear) form, we now use the formula from above. [br][br][list=1][*][math]\int p\left(t\right)dt=\int0.196dt=0.196t[/math][br][/*][*][math]\mu\left(t\right)=e^{\int p\left(t\right)dt}=e^{0.196t}[/math][br][/*][*][math]y\left(t\right)=\frac{\int e^{\int p\left(t\right)dt}g\left(t\right)dt+c}{e^{\int p\left(t\right)dt}}=\frac{\int e^{0.196t}\cdot9.8dt+c}{e^{0.196t}}[/math][br][br][br][/*][*] [math]\int e^{\int p\left(t\right)dt}g\left(t\right)dt=\int e^{0.196t}\cdot9.8dt=\frac{9.8}{0.196}e^{0.196t}=50e^{0.196t}[/math][br][/*][*][math]y\left(t\right)=\frac{\int e^{0.196t}\cdot9.8dt+c}{e^{0.196t}}=\frac{50e^{0.196t}+c}{e^{0.196t}}=50+\frac{c}{e^{0.196t}}=50+c\cdot e^{-0.196t}[/math][br][/*][*][math]y\left(0\right)=50+c=48[/math] implies that [i]c[/i] must be negative 2. [/*][/list]Therefore the specific solution of the linear differential equation that satisfies the initial condition is [math]y\left(t\right)=50-2e^{-0.196t}[/math]. [br][br]Let's look at it in GeoGebra. I've adjusted the scale of the [i]x[/i] and the [i]y[/i] axes considerably so we can get a good look at the initial condition, the solution function [i]f[/i], and how the function [i]f[/i] asymptotically approaches the line [i]y[/i]=50 so we can see the nature of the solutions near this horizontal line. [br][br]I'm always slightly impressed that this algebraic method works to produce the specific solution function that matches the slope field, and passes through the initial condition so precisely.