MA1035: Engineering Modeling using Dynamic Systems

Session 04: Non-homogeneous Higher Order LODEs with cc


Prof. Alejandro Ucan-Puc

Tecnológico de Monterrey • Departamento de Ciencias

Goals

  • Understand how is made a general solution of a non-homogenous LODEs with cc.

  • Describe the function models and the relation with the non-homogenous term.

  • Describe the method of undetermined coefficients.

  • Apply the undetermined coefficients method to solve non-homogenous LODEs with cc.

Recall:

A constant-coefficient linear ODE has the form $$a_ny^{(n)}+\cdots+a_1y'+a_0y=g(x),$$ where each $a_i$ is constant.

The general solution is $y=y_h+y_p$: a homogeneous solution plus one particular solution. We will focus on this type of equation and abbreviate its name to LODE.

Some assumptions:

We will use the method when the forcing term $g(x)$ is built from these function types:

  • Polynomials, including constants: $P_n(x)$.
  • Exponentials: $e^{\alpha x}$.
  • Sines and cosines: $\sin(\beta x)$ and $\cos(\beta x)$.
  • Sums and products of these functions, such as $xe^x\sin x$.

The method of undetermined coefficients:

The method is applied for non-homogeneous LODEs with cc and the non-homogeneous term is a function $g(x)$ as in the list above.



The idea behind this method:

"the derivatives of functions $g(x)$ as in the list above, are combinations of functions in the list.

The method of undetermined coefficients:

  1. Find the homogeneous solution $y_h$.
  2. Choose a trial function $y_p$ based on the form of $g(x)$.
  3. Substitute $y_p$ into the ODE and solve for its unknown coefficients.

Choosing a Trial Function

Forcing term $g(x)$Trial function $y_p(x)$
Polynomial $P_n(x)$$A_nx^n+\cdots+A_1x+A_0$
$e^{\alpha x}P_n(x)$$e^{\alpha x}(A_nx^n+\cdots+A_0)$
$e^{\alpha x}\cos(\beta x)$ or $e^{\alpha x}\sin(\beta x)$$e^{\alpha x}(A\cos\beta x+B\sin\beta x)$
$e^{\alpha x}P_n(x)\cos(\beta x)$$e^{\alpha x}\left[P_n(x)\cos\beta x+Q_n(x)\sin\beta x\right]$

Resonance: If a trial term duplicates a term in $y_h$, multiply the entire trial function by $x^s$, where $s$ is the root's multiplicity.

Example 1:

Find $y_p$ for $y''+4y'-2y=2x^2-3x+6.$

Solution Example 1:

  1. Try $y_p=Ax^2+Bx+C$.
  2. Substitution gives $-2Ax^2+(8A-2B)x+(2A+4B-2C)=2x^2-3x+6$.
  3. Match coefficients: $A=-1$, $B=-\frac{5}{2}$, and $C=-9$.
  4. Thus, $$y_p=-x^2-\frac{5}{2}x-9.$$

Example 2:

Find the general solution to $y''-y'+y=2\sin(3x).$


Solution Example 1:

  1. From the fact that $g(x)=2\sin(3x)$ is a sine function, then the particular solution could be a sine function but the derivatives of $\sin(x)$ involve $\cos$, let's assume that is $$y_p=A\sin(3x)+B\cos(3x).$$
  1. Substituting $y_p$ in the LODEs with cc: $y_p'=3A\cos(3x)-3B\sin(3x)$ and $y_p''=-9A\sin(3x)-9B\cos(3x)$ then $$-9A\sin(3x)-9B\cos(3x)-3A\cos(3x)+3B\sin(3x)+A\sin(3x)+B\cos(3x)=2\sin(3x).$$

Example 2:

  1. We obtain the following system of equations: $$\begin{cases} -8A+6B=0 \\ 6A+8B=2 \end{cases}.$$ Solving the system we get $A=\frac{3}{10}$ and $B=\frac{1}{10}.$

  1. Therefore the particular solution is $y_p=\frac{3}{10}\sin(3x)+\frac{1}{10}\cos(3x).$

  1. The general solution is $y=y_h+y_p=C_1e^x+C_2e^x+\frac{3}{10}\sin(3x)+\frac{1}{10}\cos(3x).$

An error in the matrix

Find the solution for $$y''-5y'+4y=8e^x.$$



Now try with the following model function: $$y_p=Axe^x.$$

Example 3:

Find the particular solution to $y''-2y'-3y=4x-5+6xe^{2x}.$ In this case the particular solution should be of the form: $$y_p=Ax+B+Cxe^{2x}+Ee^{2x}.$$

Summary & Next Step

General solution structure y = yh + yp, method of undetermined coefficients, trial functions table, and polynomial/trigonometric forcing.

Next Session: Mechanical Vibrations and RLC Circuits