# Thread: 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?

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

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

$\displaystyle r = 2, 3$

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

$\displaystyle y_1 = e^{2t}$

$\displaystyle y_2 = e^{3t}$

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

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

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

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

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

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

$\displaystyle y = uy_1 + vy_2$

$\displaystyle 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]$

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

Wolfram Alpha says the answer is this:

$\displaystyle 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?

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

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

$\displaystyle r = 2, 3$

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

$\displaystyle y_1 = e^{2t}$

$\displaystyle y_2 = e^{3t}$

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

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

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

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

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

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

$\displaystyle y = uy_1 + vy_2$

$\displaystyle 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]$

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

Wolfram Alpha says the answer is this:

$\displaystyle 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':$\displaystyle y=Ate^{3t}+Be^{3t}+Fcos{t}+Esin{t}$

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

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

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

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

$\displaystyle 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)$

$\displaystyle (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) )$

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

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

After solving:

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

Hence 'special integral' is:

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

and the primitive is therefor:

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

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

$\displaystyle 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:

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

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

$\displaystyle 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 $\displaystyle 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 $\displaystyle 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 $\displaystyle y= -\frac{1}{5}cos(t)$ then $\displaystyle y'= \frac{1}{5}sin(t)$ and $\displaystyle y''= \frac{1}{5}cos(t)$ so that
$\displaystyle y''- 5y'+ 6y= \frac{1}{5}cos(t)- sin(t)- \frac{1}{5}cos(t)= -sin(t)$ not cos(t) as you want.