### Differential equations: Linear first-order differential equations

### Solving linear first-order ODEs

We recall that the general linear first-order differential equation has the following form: \[a_1(t)\cdot y'(t)+a_0(t)\cdot y(t)+b(t)=0\] Because the order of the ODE equals #1#, the function #a_1(t)# cannot be the constant function #0#. Without too great a loss of generality (we will sometimes have to limit ourselves to a smaller *domain* for the functions in question), we can divide the terms of the equation by #a_1(t)#, so the equation attains the form #y'+p(t)\cdot y = q(t)#, which we will call the **standard form**. We show how to find the solution of this ODE.

Solutions of first-order linear ODEs

Suppose that #p(t)# and #q(t)# are continuous functions and that \(P(t)\) is an antiderivative of \(p(t)\). Then the general solution of the ODE

\[y'+p(t)\cdot y = q(t)\] is equal to \[y(t)=\e^{-P(t)}\cdot(F(t)+C)\] where #C# is a constant and #F(t)# is an antiderivative of \(\e^{P(t)}\cdot q(t)\).

The choice of \(C\) depends on the initial value: when \(y(t_0)=y_0\), then the specific solution satisfies \[C= \e^{P(t_0)}\cdot y_0 - F(t_0)\]

The function #y_{\text{part}} = \e^{-P(t)}\cdot F(t)# is a particular solution and the function #y_{\text{hom}} = C\cdot \e^{-P(t)}# is the general solution of the corresponding homogeneous equation.

The theorem suggests a general method for finding the solution: first find an antiderivative #P(t)# of #p(t)# and then a antiderivative #F(t)# of \(\e^{P(t)}\cdot q(t)\). In terms of these functions, the answer will be #y(t)=\e^{-P(t)}\cdot(F(t)+C)#, where #C# is a constant.

Often there are other methods, such as separation of variables if #q(t)# is the product of a function of #y# by a function of #t#, or finding a particular solution and the solving the homogeneous equation. We give some examples.

Below the *slope field* associated with the ODE \[y'=t+y\] is outlined on the rectangle \(-10\le t\le 10\land -7\le y\le 7\).

When passing along each vertical line from bottom to top, the slope changes from negative to positive. By setting #y'=t+y=0#, we see that the slope is #0# at the point #\rv{t,y}=\rv{2,-2}#. This point is drawn red in the slope field.

Calculate the specific solution through this point.

#y=# #\euler^{t-2}-t-1#

We start with the ODE rearranged in the standard form #y'+p(t)\cdot y= q(t)# with #p(t)=-1# and #q(t)=t#. We carry out the method of the *theory*. (A good alternative is to solve the homogeneous equation and to find a particuliar solution that is a linear function of #t#.)

First we calculate the required antiderivatives.

\[\begin{array}{rcl} \displaystyle \dfrac{\dd y}{\dd t}-y&=& \displaystyle t\\

&&\phantom{x}\color{blue}{\text{the ODE in standard form}}\\

P(t) &=&\displaystyle -t\\

&&\phantom{x}\color{blue}{\text{antiderivative of }p(t) =-1}\\

F(t)

&=&\displaystyle \int t\cdot \euler^ {- t }\, \dd t\\

&&\phantom{x}\color{blue}{\text{integral of }\e^{P(t)}\cdot q(t)}\\

&=&\displaystyle \left(-t-1\right)\cdot \euler^ {- t } +C\\

&&\phantom{x}\color{blue}{\text{antiderivative calulated}}

\end{array}\]

Then we use the fomula of the theory to find the general solution:

\[\begin{array}{rcl}

y&=&\displaystyle \e^{-P(t)}\cdot \left(F(t)+C\right)\\

&&\phantom{x}\color{blue}{\text{formula of the theorem}}\\

&=&\displaystyle\e^{+t}\cdot \left(\left(-t-1\right)\cdot \euler^ {- t }+C\right)\\

&&\phantom{x}\color{blue}{P(t),\ F(t)\text{ substituted}}\\

&=&\displaystyle C\cdot \euler^{t}-t-1\\

&&\phantom{x}\color{blue}{\text{simplified}}

\end{array}\]

Thus, the general solution is #y=C\cdot \euler^{t}-t-1#. In order to find the specific solution through the point #\rv{t,y} = \rv{2,-2}#, we fill in the coordinate values of the point in the general solution. This gives the equation

\[-2=\euler^2\cdot C-3 \]

with the solution #C=\euler^ {- 2 }#. Substitution of #C=\euler^ {- 2 }# in the general solution gives the specific solution \(y=\euler^{t-2}-t-1\).

**Pass Your Math**independent of your university. See pricing and more.

Or visit omptest.org if jou are taking an OMPT exam.