# 2nd order non homogeneous equation

#### mitch987

1. The problem statement, all variables and given/known data
y'' + y = -2 Sinx

2. Relevant equations

3. The attempt at a solution
finding the homogeneous solution, is simple;
yh(x) = C1 Cos(x) + C2 Sin(x)

for the particular solution,
I let y = A Cos(x) + B Sin(x)
thus, y' = -A Sin(x) + B Cos(x)
y'' = -A Cos(x) - B Sin(x)

substituting these into the differential equation;
-A Cos(x) - B Sin(x) + A Cos(x) + B Sin(x) = -2 Sin(x)
0 = -2 Sin(x)

This is where i get stuck as i'm unable to find any values for A & B and hence, cannot find the particular solution in order to find the general solution y(x) = yh(x) + yp(x)
Any help would be greatly appreciated.
Thanks,

#### fzero

Homework Helper
Gold Member
The particular solution must be linearly independent of the homogeneous solutions. Since those are already $$\sin x$$ and $$\cos x$$, you should try $$x\sin x$$ and $$x\cos x$$.

#### mitch987

of course! Forgot that the particular solution cannot equal the homogeneous solution.

### The Physics Forums Way

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving