1
$\begingroup$

The difference equation 2.5(y(t)-y(t-1))=0.1y(t) has a general solution of y(t)=8(1.04)^t, thus with y(0)=8 the particular solution is y(t)=8(1.04)^t.

If I run the problem with Maple, I get exactly the expected answer. However, if I run the problem in Mathematica, I get a wrong answer:

RSolve[2.5 (y[t] - y[t - 1]) == 0.1 y[t], y[t], t]

$$ \left\{\left\{y(t)\to c_1 0.96^{1.\, -1. t}\right\}\right\} $$

With the particular solution

RSolve[{2.5 (y[t] - y[t - 1]) == 0.1 y[t], y[0] == 8}, y[t], t]

$$ \left\{\left\{y(t)\to 8. 0.96^{-1. t}\right\}\right\} $$

Which is not the expected answer. What am I doing wrong here?

$\endgroup$
  • $\begingroup$ As it happens, the "correct" answer and Mathematica's evaluate to approximately the same results. I still cannot explain the difference in the solutions. $\endgroup$ – team-rf Mar 9 '16 at 19:47
  • 2
    $\begingroup$ $0.96^{-1} \approx 1.04$... $\endgroup$ – Marius Ladegård Meyer Mar 9 '16 at 19:47
  • 1
    $\begingroup$ And if you replace 2.5 by 25/10 and 0.1 by 1/10 you get exact coefficients. $\endgroup$ – Marius Ladegård Meyer Mar 9 '16 at 19:51
5
$\begingroup$

As it turns out, both answers are correct. This is mathematica's answer when using rational numbers:

$$ \left\{\left\{y(t)\to 8^{1-t} \left(\frac{25}{3}\right)^t\right\}\right\} $$

Maple's answer is

$$ t\rightarrow 8 \left(\frac{25}{24}\right)^t $$

Mathematica's is more complex, but correct after all.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.