Separable Differential Equations

So far we have seen how to solve first order differential equations when they are linear. If the equation is not directly integrable, we can multiply both sides by an integrating factor in order to write the equation in a form that can be directly integrated.

Non-linear equations are more complicated. In fact, not all nonlinear equations have an analytical solution. By this I mean that it is not always possible to find an expression for the state variable y in terms of the independent variable t. This doesn't mean a solution doesn't exist. There is often still a solution to the differential equation, we just aren't able to find it. For example, the equation dydt+sin(y)=sin(t) doesn't have a solution that we can express interms of elementary functions. However, we can still find an numerical approximation for solutions, which will be the topic of this week's lab.

There are a few categories of first order differential equations that we can solve. One example of these equations are separable differential equations.

Definition: A first order differential equation for y(t) is separable if it can be written in the form dydt=f(t)g(y) for some function f(t) and g(y).

Example: The differential equation dydt=tan(t)y is separable with f(t)=tan(t) and g(y)=1/y.

Practice: Which of the following differential equations are separable?

  1. dydt+ty=t
  2. dydt=1+y2tt
  3. dydt=y(1y)
  4. dydt=et2+y2

As long as g(y)0, we can solve separable equations by rewriting them as 1g(y)dydt=f(t) and integrating with respect to t. By making the substitution u=y,  du=dydt, we get 1g(u)du=f(t)dt. As long as we are able to evaluate both integrals, we can find a family of solutions.

Example: Find a solution to the initial value problem: dydt=tanty,y(0)=1

Solution: This is a separable equation with f(t)=tant and g(y)=1/y. Therefore, ydydt=tan(t)ydydtdt=sin(t)cos(t)dtlet u=cost,  du=sin(t)dtydy=1udu12y2=ln(u)+Csub u=cost back in12y2=ln(cost)+Cy(t)=2C2ln(cost), Which is defined and differentiable for t in the interval (π/2,π/2)

Example: Find a one parameter family of solutions to dydt=y(4y),

This is a separable equation with f(t)=1 and g(y)=y(4y). By separating, and integrating we get 1y(4y)dydtdt=1dt. Canceling the dts on the left hand side, and evaluating the right hand side leaves us with 1y(4y)dy=t+C. To solve the integral on the right hand side, we will want to re-write the integrand using a partial fraction decomposition. I.e. we want to write 1y(4y)=Ay+B4y for some constants A and B. These constants can be found by multiplying through by y(4y), and then collecting like terms in y: 1=Ayy(4y)+B4yy(4y)1=A(4y)+By1+0y=4A+(BA)y. In order for this to be true for all values of y, the constant terms on the left must match the constant terms on the right, and the likewise for the y terms. Therefore, we have A=1/4, A=B=1/4, and 1y(4y)=14y+14(4y)

Going back to our differential equation, we have 1y(4y)dy=t+C14y+14(4y)dy=t+C14ln|y|14ln|4y|=t+C. Solving for y gives y4y=e4t+C=e4teClet C~=eCy=C~e4t(4y)y+C~e4ty=4C~e4ty=4C~e4t1+C~e4t. Which is a defined and differentiable for all t(,).

Exercises

Find a one parameter family of solutions for each differential equation

  1. dydt=sin(t)sin(y)
  2. dydt+ty=t
  3. dydt=y(t+1)(t1)
  4. dydt=ty2(t+2)(t+3)