# Homework Help: Calculus II - Solving Second Order Differential Equation

1. Aug 24, 2011

### GreenPrint

1. The problem statement, all variables and given/known data

Which of the following functions are soltuions of the differntial equation y''+y=sin(x)?
a) y=cos(x) b) y=sin(x) c) y=1/2*xcos(x) d) y=1/2*x*sin(x)

2. Relevant equations

3. The attempt at a solution

I'm kind of lost on how to solve this problem. I don't think this is a standard calculus II problem but it was on a packet that we were asked to solve.

I learned from the internet that you can solve a second differential order equation of form
Af''(x) + Bf'(x) + Cf(x) = 0
By setting f'(x) as r_1, f''(x) as r_2, f(x) as 1
then
Ar^2 + Br + C = 0
and plugging into
y(x) = c_1 e^(r_1*x) + c_2*e^(r_2*x)
were c_1 and c_2 are just some constants that can be solved for if your given initial conditions

I'm unsure how to solve this problem because it's of a different form of
f''(x) + f(x) = sin(x)
I'm unsure what to do about the sin(x) term in this case and not sure what to do sense I don't have initial condition and how to come up with the constant terms as a result...

Thanks for any Help!

2. Aug 24, 2011

### Hootenanny

Staff Emeritus
3. Aug 24, 2011

### GreenPrint

Thanks for your response. No I have never seen type of equation before. Is it a standard calculus II topic? That pdf file looks very useful, I'll see if I can solve the problem after looking over it.

4. Aug 24, 2011

### Hootenanny

Staff Emeritus
I am not familiar with the US education system, so I can't comment. However, over here in the UK, this is first year undergraduate level.

5. Aug 24, 2011

### mstud

You can also, when checking for solutions, think in the other direction, which makes the calculation quite simple.

find y'' of the suggested y=...

Calculate y''+y and see if this equals sin(x)

I think you'll find that's far easier than solving the 2nd order differential equation.

When I learned about diff eqs this spring we started approaching possible solutions this way, later we learn't how to solve such differential equations.

6. Aug 24, 2011

### dynamicsolo

You are not being asked to solve the differential equation (inhomogeneous second-order ordinary differential equations are not a Calculus II topic), but to "verify" a solution. Which choice works in the equation?

7. Aug 24, 2011

### GreenPrint

I'm actually getting none of them

a) y=cos(x)
y'=-sin(x)
y''=-cos(x)
y''+y=-cos(x)+cos(x)=0

b)y=sin(x)
y'=cos(x)
y''=-sin(x)
y''+y=-sin(x)+sin(x)=0

c)y=(xcos(x))/2
y'=(-xsin(x))/2+cos(x)/2
y''=-(xcos(x))/2-sin(x)
y''+y=(-xcos(x))/2-sin(x)+(xcos(x))/2=-sin(x)

d)y=(xsin(x))/2
y'=sin(x)/2+(xcos(x))/2
y''=cos(x)/2+cos(x)/2-(xsin(x))/2=cos(x)-(xsin(x))/2
y''+y=cos(x)-(xsin(x))/2+(xsin(x))/=cos(x)

Is the problem missed up or am I doing something wrong because I'm getting that all the answers are wrong?

8. Aug 24, 2011

### mstud

I can't find something wrong there...

9. Aug 24, 2011

### Staff: Mentor

As you show the problem, none of the given functions is a solution. It would be a good idea to check that you wrote them down correctly, particularly the ones for parts c and d. If you missed a sign, that would affect your answer.

10. Aug 24, 2011

### Hootenanny

Staff Emeritus
None of them do, which is why I suggested that the OP look into how to solve the problem himself. I wasn't sure whether that was part of the exercise or not.

11. Aug 24, 2011

### dynamicsolo

If it's a multiple-choice question for practice, finding the error is probably not part of the exercise.

I guess I want to ask whether this set of problems came from a published source or from an instructor. It wouldn't be the first time I'd seen someone make up a bunch of problems and not check for typoes or whether a problem could even be solved as stated. I suspect the answer was intended to be (c), but a minus sign was omitted on the inhomogeneous term or on the solution. [I agree that there are no errors in GreenPrint's calculations.]

12. Aug 24, 2011

### GreenPrint

It actually came from my professor, I guess the problem is messed up, I'm glad I didn't do something wrong =). It's strange, the difference between education systems, it's something taught in first year undergraduate math but not in the US apparently... I guess they have better education systems elsewhere lol, that doesn't surprise me

13. Aug 24, 2011

### Hootenanny

Staff Emeritus
Fair point. I just didn't want to give the answer away if this wasn't the case

14. Aug 24, 2011

### Staff: Mentor

Solving the differential equation is probably too advanced for a Calc II course, but verifying that a given function is a solution of a differential equation is appropriate, IMO. For problems like this, all you're doing is finding out whether the given function and it's relevant derivatives make the differential equation identically true.

15. Aug 24, 2011

### vela

Staff Emeritus
I seem to recall the variation of parameters method was covered in the second semester of calculus when I took it. You can use that method to solve this equation.