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 integrating factor

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=0,\, xy'-4y=0.$

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

How to solve those ODEs?

Write the ODE in standard form $$y'+P(x)y=f(x),$$ on an interval where $P(x)$ and $f(x)$ are continuous.

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

For $$y'+P(x)y=f(x),$$ define the integrating factor $$\mu(x)=e^{\int P(x)\,dx}.$$

  1. Multiply the ODE by $\mu(x)$ to obtain $$\frac{d}{dx}[\mu(x)y]=\mu(x)f(x).$$
  2. Integrate both sides, then solve for $y$.

Example 1

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

  1. Standard form: $$y'-\frac{3}{4}y=1.$$
  2. Integrating factor: $$\mu(x)=e^{-3x/4}.$$
  3. Multiply and integrate: $$e^{-3x/4}y=-\frac{4}{3}e^{-3x/4}+C.$$
  4. Solve for $y$: $$y=-\frac{4}{3}+Ce^{3x/4}.$$

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 las ecuaciones:

  • $y'-2xy=2x,$
  • $y'+x^5y=x^5,$
  • $xy'-y=x^2\sin(x).$
  • 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