# Solving ODE problem with calculator

I'm trying to solve a below ODE problem with TI-nspire cas:

$$y''-4y'+3y=cos^2x$$

If I solve the above problem by hand (or using the wolfram alpha), I get the

$$y=c_1e^x+c_2e^{3x}+\frac16-\frac{1}{130}(cos 2x+8sin2x)$$ However, when I solve this with Ti-nspire cas, gives the following answer: $$y=c_1e^x+c_2e^{3x}+\frac{31}{195}-\frac{8sin(x)cos(x)}{65}+\frac{sin(x)^2}{65}$$ I type in the calculator as follows: $$desolve(y''-4y'+3y=(cos(x))^2,x,y)$$ Is there any problem with my input? Or is the calculator failing to solve this?

I look forward to some help. Thanks.

• I think you meant to write $e^{x}$ and $e^{3x}$ instead of $x^x$ and $x^{3x}$. – Dave Jan 1 '17 at 5:32
• And I think you typo'd one off the signs there (on $\cos 2 x$) – Batman Jan 1 '17 at 5:33
• Oh yeah, Dave, you're completely right, I've edited the text. Thank you. – James Jan 1 '17 at 5:42
• Thanks Batman, I think it 's all right now. – James Jan 1 '17 at 5:46
• MathJax hint: if you put backslashes before functions they come out in the correct font and spacing, so \sin x gives $\sin x$ instead of sin x giving $sin x$ – Ross Millikan Jan 1 '17 at 6:37

Use the trigonometric identities $\cos(2x) = 1-2 \sin^2 x$ and $\sin(2x) = 2 \sin x \cos x$.