Solving Nonhomogeneous Second-Order Differential Equations using Separable Variables, Study notes of Differential Equations

The method for solving nonhomogeneous second-order differential equations by separating variables and finding complementary functions yc and particular solutions yp. It covers two cases: when f(x) is a constant, exponential, or a combination of cosine and sine functions. Examples and step-by-step solutions.

Typology: Study notes

2021/2022

Uploaded on 09/27/2022

sunday
sunday 🇬🇧

4.5

(12)

213 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Nonhomogeneous Second-Order Differential Equations
To solve ay′′ +by+cy =f(x) we first consider the solution of the form y=yc+ypwhere
ycsolves the differential equaiton ay′′ +by+cy = 0 and ypsolves the differential equation
ay′′ +by+cy =f(x).
Since the derivative of the sum equals the sum of the derivatives, we will have a final
solution of 0 + f(x) which gives f(x).
Therefore, we follow a pattern for ypto yield f(x) when each of y,yand y′′ are substi-
tuted into the above equation.
1. Case I: If f(x) is of the form f(x) = P(x)ekx then we set:
yp=Q(x)ekx where Q(x) is the general polynomial of the same degree as P(x).
For example if the differential equation is set equal to:
(a) f(x) = x2e3x. Set yp= (Ax2+Bx +C)e3x.
(b) f(x) = x34x+ 1. Set yp=Ax3+Bx2+C x +D.
(c) f(x) = 6e2x. Set yp=Ae2x.
Then we substitute yp,y
p, and y′′
pand solve for the coefficients.
2. Case II: If f(x) is of the form f(x) = P(x)ekx sin (mx) or f(x) = P(x)ekx cos (mx),
then we set:
yp=Q(x)ekx cos (mx) + R(x)ekx sin (mx) where Q(x) and R(x) are both general
polynomials of the same degree as P(x).
For example if the differential equation is set equal to:
(a) f(x) = 2 cos( 3x). Set yp=Acos (3x) + Bsin (3x)
(b) f(x) = xcos (x). Set yp= (Ax +B) cos (x) + (Cx +D) sin (x)
(c) f(x) = exsin (2x). Set yp=Aexsin (2x) + B excos (2x)
If f(x) is a sum of terms, like f(x) = x2+ex+ cos (x), do it as separate problems solving
for
yp1=Ax2+Bx +C,
yp2=Aexand
yp3=Acos (x) + Bsin (x).
pf3

Partial preview of the text

Download Solving Nonhomogeneous Second-Order Differential Equations using Separable Variables and more Study notes Differential Equations in PDF only on Docsity!

Nonhomogeneous Second-Order Differential Equations To solve ay′′^ + by′^ + cy = f (x) we first consider the solution of the form y = yc + yp where yc solves the differential equaiton ay′′^ + by′^ + cy = 0 and yp solves the differential equation ay′′^ + by′^ + cy = f (x). Since the derivative of the sum equals the sum of the derivatives, we will have a final solution of 0 + f (x) which gives f (x). Therefore, we follow a pattern for yp to yield f (x) when each of y, y′^ and y′′^ are substi- tuted into the above equation.

  1. Case I: If f (x) is of the form f (x) = P (x)ekx^ then we set: yp = Q(x)ekx^ where Q(x) is the general polynomial of the same degree as P (x). For example if the differential equation is set equal to:

(a) f (x) = x^2 e^3 x. Set yp = (Ax^2 + Bx + C)e^3 x. (b) f (x) = x^3 − 4 x + 1. Set yp = Ax^3 + Bx^2 + Cx + D. (c) f (x) = 6e−^2 x. Set yp = Ae−^2 x.

Then we substitute yp, y p′, and y′′ p and solve for the coefficients.

  1. Case II: If f (x) is of the form f (x) = P (x)ekx^ sin (mx) or f (x) = P (x)ekx^ cos (mx), then we set: yp = Q(x)ekx^ cos (mx) + R(x)ekx^ sin (mx) where Q(x) and R(x) are both general polynomials of the same degree as P (x). For example if the differential equation is set equal to:

(a) f (x) = 2 cos (3x). Set yp = A cos (3x) + B sin (3x) (b) f (x) = x cos (x). Set yp = (Ax + B) cos (x) + (Cx + D) sin (x) (c) f (x) = ex^ sin (2x). Set yp = Aex^ sin (2x) + Bex^ cos (2x)

If f (x) is a sum of terms, like f (x) = x^2 + e−x^ + cos (x), do it as separate problems solving for yp 1 = Ax^2 + Bx + C, yp 2 = Ae−x^ and yp 3 = A cos (x) + B sin (x).

Examples

  1. y′′^ + 2y′^ + y = 3 cos (2x), y(0) = 0, y′(0) = 1

y = yc + yp

r^2 + 2r + 1 = 0. r = −1. Therefore yc = Me−x^ + Nxe−x^ (hold until end). Now to determine yp, consider the form: yp = A cos (2x) + B sin (2x). Then differentiating gives y p′ = − 2 A sin (2x) + 2B cos (2x) y p′′ = − 4 A cos (2x) − 4 B sin (2x). Substituting gives: − 4 A cos (2x) − 4 B sin (2x) − 4 A sin (2x) + 4B cos (2x) + A cos (2x) + B sin (2x) = 3 cos (2x) So that: − 4 A + 4B + A = 3 and − 4 B − 4 A + B = 0 The system of equations gives A = − 259 and B = 1225. NOT DONE: We now have

y = Me−x^ + Nxe−x^ −

cos (2x) +

sin (2x)

Substituting the initial conditions gives M = 259 and N = 1025. DONE

y =

e−x^ +

xe−x^ −

cos (2x) +

sin (2x)