Finding the homogeneous part of general solution to second order non-homogeneous differential equation

807 Views Asked by At

I was given this non-homogeneous second order differential equation:

$\dfrac{d^2y}{dx^2} + y = sec(x)$

In order to solve this, I need to find the general solution to the homogeneous part by finding the characteristic equation which is:

$\lambda^2 + 1 = 0$

$\lambda^2 = -1 $

$\lambda = \pm i $

According to my understanding, based on the roots from characteristic equation , the general solution to homogeneous part should be

$y_{homogeneous} = Ae^{ix} + Be^{-ix}$

But Instead,In my text, it was written as this:

$y_{homogeneous} = Acos(x) + Bsin(x)$

I am aware that I could use Euler's formula to convert my exponential terms into sine and cosine but even then I would not be able to get the solution given in the text.

What am i missing?

1

There are 1 best solutions below

1
On BEST ANSWER

You're on the right path. Like you said, why don't you use Euler's formula to turn your exponentials into sines and cosines and then collect like terms, remembering that

(A+B)

and

(A-B)i

are just constants, so can be replaced with another letter of your choosing.