Differential Equations Exercise 17

Let’s solve the following non-homogeneous second-order differential equation:

$$ y''+y = x^2 $$

This is a complete linear differential equation.

The corresponding homogeneous equation is:

$$ ay''+ by' + cy = 0 $$

with a=1, b=0, and c=1

$$ y''+ y = 0 $$

To solve it, we look at the characteristic equation using the auxiliary variable t:

$$ t^2 + 1 = 0 $$

Its discriminant is negative:

$$ \Delta = b^2 - 4ac = 0^2 - 4(1)(1) = -4 $$

So the characteristic equation has two complex roots:

$$ t = \frac{0 \pm \sqrt{-4}}{2} $$

$$ t = \frac{\pm \sqrt{4i^2}}{2} $$

$$ t = \frac{\pm i \sqrt{4}}{2} $$

$$ t = \frac{\pm i \cdot 2}{2} = \begin{cases} 0 + i \\ \\ 0-i \end{cases} $$

That is, α=0 and β=1.

Hence, the general solution of the homogeneous equation is a complex solution of the form:

$$ y_o = c_1 e^{ \alpha x} \cos(\beta x) +c_2e^{\alpha x} \sin{\beta x} $$

Substituting α=0 and β=1, we get:

$$ y_o = c_1 \cos(x) +c_2 \sin{x} $$

Next, we need a particular solution yp of the differential equation.

We use the method of undetermined coefficients:

$$ ay''+by'+cy = f(x) $$

Here f(x)=x^2, with a=1, b=1, c=0.

Since the forcing term is a quadratic polynomial P2(x)=x2, we assume:

$$ y_p = B x^2 + Ax + C $$

Taking derivatives gives:

$$ y_p' = A + 2Bx \qquad y_p'' = 2B $$

Substituting into the original equation:

$$ 2B + (Ax+Bx^2+C) = x^2 $$

Grouping like terms:

$$ x^2(B) + x(A) + (2B+C) = x^2 $$

Matching coefficients yields A=0, B=1, and 2B+C=0:

$$ \begin{cases} A = 0 \\ \\ B = 1 \\ \\ 2B+C = 0 \end{cases} $$

Explanation. Comparing coefficients: the x term gives A=0. The x2 term gives B=1. The constant term gives 2B+C=0.

Solving the system:

$$ A = 0, \; B = 1, \; C = -2 $$

So the particular solution is:

$$ y_p = x^2 -2 $$

The general solution is then:

$$ y = y_o + y_p = c_1 \cos(x) +c_2 \sin{x} + x^2 - 2 $$

    Alternative Approach

    The same problem can also be solved using the Wronskian method. Starting from the homogeneous solution:

    $$ y_o = c_

     
     

    Please feel free to point out any errors or typos, or share suggestions to improve these notes. English isn't my first language, so if you notice any mistakes, let me know, and I'll be sure to fix them.

    FacebookTwitterLinkedinLinkedin
    knowledge base

    Differential Equations

    First-Order Differential Equations

    Second-Order Differential Equations

    Higher-Order Linear Equations

    Examples and Practice Problems

    Theory

    Approximate Solutions