# Math Help - Discrepancy with Wofram Alpha. Did I make a mistake?

1. ## Discrepancy with Wofram Alpha. Did I make a mistake?

I solved an ODE, but I'm finding a discrepancy between the answer I came up with and what Wolfram Alpha says is the answer.

Can anyone tell me if I made a mistake, or if my answer is also valid?

$y'' - 5y' + 6y = 2e^{3t} + cos(t)$

$r^2 - 5r + 6 = 0$

$r = 2, 3$

$y_h = C_1e^{2t} + C_2e^{3t}$

$y_1 = e^{2t}$

$y_2 = e^{3t}$

$W(y_1, y_2) = e^{5t}$

$g(t) = 2e^{3t} + cos(t)$

$u = \int -\frac{(2e^{3t} + cos(t))e^{3t}}{e^{5t}} dt$

$u = -2e^t - \frac{1}{5}e^{-2t}(sin(t) - 2cos(t)) + C_1$

$v = \frac{(2e^{3t} + cos(t))2e^{2t}}{e^{5t}}$

$v = 4t + \frac{1}{5}e^{-3t}(sin(t) - 3cos(t)) + C_2$

$y = uy_1 + vy_2$

$y = e^{2t}[-2e^t - \frac{1}{5}e^{-2t}(sin(t) - 2cos(t)) + C_1] + e^{3t}[4t + \frac{1}{5}e^{-3t}(sin(t) - 3cos(t)) + C_2]$

$y = C_1e^{2t} + C_2e^{3t} - 2e^{3t} + 4te^{3t} - \frac{1}{5}cos(t)$

Wolfram Alpha says the answer is this:

$y = C_1e^{2t} + C_2e^{3t} + 2te^{3t} - \frac{1}{10}sin(t) + \frac{1}{10}cos(t)$

Did I make a mistake?

2. ## Re: Discrepancy with Wofram Alpha. Did I make a mistake?

Originally Posted by Lancet
I solved an ODE, but I'm finding a discrepancy between the answer I came up with and what Wolfram Alpha says is the answer.

Can anyone tell me if I made a mistake, or if my answer is also valid?

$y'' - 5y' + 6y = 2e^{3t} + cos(t)$

$r^2 - 5r + 6 = 0$

$r = 2, 3$

$y_h = C_1e^{2t} + C_2e^{3t}$

$y_1 = e^{2t}$

$y_2 = e^{3t}$

$W(y_1, y_2) = e^{5t}$

$g(t) = 2e^{3t} + cos(t)$

$u = \int -\frac{(2e^{3t} + cos(t))e^{3t}}{e^{5t}} dt$

$u = -2e^t - \frac{1}{5}e^{-2t}(sin(t) - 2cos(t)) + C_1$

$v = \frac{(2e^{3t} + cos(t))2e^{2t}}{e^{5t}}$

$v = 4t + \frac{1}{5}e^{-3t}(sin(t) - 3cos(t)) + C_2$

$y = uy_1 + vy_2$

$y = e^{2t}[-2e^t - \frac{1}{5}e^{-2t}(sin(t) - 2cos(t)) + C_1] + e^{3t}[4t + \frac{1}{5}e^{-3t}(sin(t) - 3cos(t)) + C_2]$

$y = C_1e^{2t} + C_2e^{3t} - 2e^{3t} + 4te^{3t} - \frac{1}{5}cos(t)$

Wolfram Alpha says the answer is this:

$y = C_1e^{2t} + C_2e^{3t} + 2te^{3t} - \frac{1}{10}sin(t) + \frac{1}{10}cos(t)$

Did I make a mistake?

Choose as 'special integral': $y=Ate^{3t}+Be^{3t}+Fcos{t}+Esin{t}$

Now, compute D{y}, D^2{y}.

Find the coefficients $A,B,F,E$ by comparing method.

$y=Ate^{3t}+Be^{3t}+Fcos{t}+Esin{t}$

$D(y)=y'=(Ate^{3t}+Be^{3t}+Fcos{t}+Esin{t})'=Ae^{3t }+3Ate^{3t}+3Be^{3t}-Fsin(t)+Ecos(t)$

$D^2(y)=y''=(Ae^{3t}+3Ate^{3t}+3Be^{3t}-Fsin(t)+Ecos(t))'=3Ae^{3t}+3Ae^{3t}+9Ate^{3t}+9Be^ {3t}-Fcos(t)-Esin(t)$

$(D^2-5D+6)y=3Ae^{3t}+3Ae^{3t}+9Ate^{3t}+9Be^{3t}-Fcos(t)-Esin(t)-5(Ae^{3t}+3Ate^{3t}+3Be^{3t}-Fsin(t)+Ecos(t))+6(Ate{3t}+Be^{3t}+Fcos(t)+Esin(t) )$

$te^{3t}(9A-15A+6A)+e^{3t}(A)+cos(t)(5F-5E)+sin(t)(5E+5F)=2e^{3t}+cos(t)$

$\left\{\begin{matrix} A=2 \\5F-5E=1 \\ 5E+5F=0\end{matrix}\right$

After solving:

$A=2$
$F=\frac{1}{10}$
$E=-\frac{1}{10}$

Hence 'special integral' is:

$y=2te^{3t}+Be^{3t}+\frac{1}{10}cos{t}-\frac{1}{10}sin{t}$

and the primitive is therefor:

$y=C_1e^{2t}+C_{*}e^{3t}+2te^{3t}+Be^{3t}+\frac{1}{ 10}cos{t}-\frac{1}{10}sin{t}$

If $C_2=C_{*}+B$,

$y=C_1e^{2t}+C_{2}e^{3t}+2te^{3t}+\frac{1}{10}cos{t }-\frac{1}{10}sin{t}$

3. ## Re: Discrepancy with Wofram Alpha. Did I make a mistake?

Originally Posted by Also sprach Zarathustra

Choose as 'special integral': y=Ate^{3t}+Be^{3t}+Fcos{t}+Esin{t}

Now, compute D{y}, D^2{y}.

Find the coefficients A,B,F,E BY comparing method.

I'm not sure I understand what you mean. I did this:

$y = Ate^{3t} + Be^{3t} + Fcos(t) + Esin(t)$

$y' = Ae^{3t} + 3Ate^{3t} + 3Be^{3t} - Fsin(t) + Ecos(t)$

$y'' = 3Ae^{3t} + 3Ae^{3t} + 9Ate^{3t} + 9Be^{3t} - Fcos(t) - Esin(t)$

Is that what you meant? I'm not sure what you want me to do from here.

4. ## Re: Discrepancy with Wofram Alpha. Did I make a mistake?

Since $e^{3t}$ is a part of your complementary solution you won't need this term in your particular solution.

5. ## Re: Discrepancy with Wofram Alpha. Did I make a mistake?

Originally Posted by Danny
Since $e^{3t}$ is a part of your complementary solution you won't need this term in your particular solution.
Okay, thank you for that. But even taking that into consideration, what about the other differences? Do they mean I made a mistake, or is answer just a different, but correct solution?

6. ## Re: Discrepancy with Wofram Alpha. Did I make a mistake?

Yes, you made a mistake. For one thing, if $y= -\frac{1}{5}cos(t)$ then $y'= \frac{1}{5}sin(t)$ and $y''= \frac{1}{5}cos(t)$ so that
$y''- 5y'+ 6y= \frac{1}{5}cos(t)- sin(t)- \frac{1}{5}cos(t)= -sin(t)$ not cos(t) as you want.