MA1035: Engineering Modeling using Dynamic Systems

Session 02: Non-homogeneous 1st Order Linear ODEs


Prof. Alejandro Ucan-Puc

Tecnológico de Monterrey • Departamento de Ciencias

Session's Goals

  • Learn the generic form of a linear ODE

  • Learn how to solve linear ODEs

  • Learn the method of variation of parameters

Linear ODE.

The generic form of a linear ODE is $$a_1(x)y'+a_0(x)y+g(x)=0,$$ where $a_0(x)$ and $a_1(x)$ are the coefficients.

If $g(x)=0,$ then the ODE is said to be homogeneous, otherwise it is non-homogeneous.

Example:

Homogeneuos: $y'-2xy-2=0,\, xy'-4y-x^6e^x=0.$

Non-homogeneuos: $y'-2xy-2=1,\, xy'-4y-x^6e^x=1.$

How to solve those ODEs?

Put the ODE in form $$y'+P(x)y=f(x).$$ Our solutions have to be in an interval $I$ where $P(x)$ and $f(x)$ are continuous functions.

The solution is given by $$y(x)=y_h(x)+y_p(x),$$ where $y_h$ is a solution to the homogeneous version of the ODE and $y_p$ is a particular solution of the ODE.

Method: Integrating Factor

We need to find a solution of the form $y_p=u(x)y_1(x)$ where $y_1$ is a solution of the homogeneous version of the ODE.

Método:

  1. Escribir la EDO de la forma: $$y'+P(x)y=f(x).$$
  2. The coefficient function $P(x)$ will help us to compute our integrating factor $$e^{\int P(x)dx}.$$
  3. If we multiply our ODE by the integrating factor, we obtain $$\frac{d}{dx}\left[e^{\int P(x)dx} y\right]= e^{\int P(x)dx}f(x).$$
  4. Integrate in both sides and solve for $y.$

Example 1

Solve $4y'-3y=4.$

  1. Putting the ODE in the form $y'+P(x)y=f(x)$ we have $y'-\frac{3}{4}y=1.$
  1. $P(x)=-\frac{3}{4},$ therefore the integrating factor $$e^{\int \frac{-3}{4}dx}=e^{\frac{-3}{4}x}.$$
  1. We multiply our ODE by the integrating factor and we obtain $$\frac{d}{dx}\left[e^{\frac{-3}{4}x}y\right]=e^{\frac{-3}{4}x}.$$
  1. We integrate and solve for $y.$ $$e^{\frac{-3}{4}x}y=c\Rightarrow y=ce^{\frac{3}{4}x}.$$

Integramos y despejamos: $$e^{-3x}y=c\Rightarrow y=c e^{3x}.$$

Example 2

Solve $y'-2y=6.$

  1. It is already in its standard form.
  1. $P(x)=-2,$ therefore the integrating factor is $$e^{\int -2dx}=e^{-2x}.$$
  1. We multiply our ODE by the integrating factor and we obtain $$\frac{d}{dx}\left[e^{-2x}y\right]=6e^{-2x}.$$
  1. We integrate both sides and solve for $y$: $$e^{-2x}y=-3e^{-2x}+c\Rightarrow y=-3+ce^{-2x}.$$

Ejemplo 3

Resuelva la ecuación $y'-2xy=2x.$

Modelling using Linear non-Homogeneous ODEs

A colony of bacteria grows at the same rate to the number of bacteria present. The body where the bacterial colony is located is placed on a contaminated place and the the bacteria enters the body at the same rate as time. If the colony starts with 100 bacteria. What is the function that models the number of bacteria?

Modelling using Linear non-Homogeneous ODEs

The rate of change of the temperature of a machinery is equal to the difference between the temperature of the machinery and the temperature of the environment. The room is cooling with Air Condition that is turn on and off, the temperature of the room is given by $T(t)=20+5\sin(t).$ If at the beggining the machinery is at 85 degrees, what is the function that models the temperature of the machinery?

Summary & Next Step

Standard linear form, integrating factor method, variation of parameters, and applications to dilution and thermal models.

Next Session: Higher Order Linear Differential Equations with cc