Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Given the initial-value problem $$y' = te^{3t} - 2y,\qquad 0 \leq t \leq 1, \qquad y(0) = 0$$ with $h = 0.5$. Use the Taylor's method of order two to approximate the solutions to the given IVP. (Solution: $w_1 = 0.12500000$, $w_2 = 2.02323897$.)

I've tried this problem quite a few times but keep getting incorrect answers. My guess is that I'm calculating the derivative incorrectly which is giving me an incorrect result for $w_2$. My approach so far is as follows:

Observe that $f(t, y) = te^{3t} - 2y$. I calculate that $f'(t, y) = e^{3t} + 3t^2e^{3t} - 2y'$ which is the same as $f'(t, y) = e^{3t} + 3t^2e^{3t} - 2(te^{3t} - 2y) = e^{3t}(3t^2 -2t + 1) + 4y$.

Also, $t_0 = 0$, $t_1 = 0.5$, and $t_2 = 1$.

$w_0 = 0$, $w_1 = w_0 + h(f(t_0, w_0) + \frac{h}{2} f'(t_0, w_0))$ and $w_2 = w_1 + h(f(t_1, w_1) + \frac{h}{2} f'(t_1, w_1))$.

Now, plugging in numbers yields: $w_0 = 0$, $w_1 = 0.125$ and $w_2 = 1.603081$.

Can someone try and catch what I've done wrong?

PS The reason I think my derivative is wrong is that I wrote a program in MATLAB to calculate the approximations using this method and tested it with an example in the book I'm using and the results we're consistent with the book's, but then when I ran my code, it didn't match the results I should be getting, according to the professor.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

When you calculate $f'(t,y)$, the derivative of $e^{3t}$ is $3e^{3t}$, not $3te^{3t}$

share|improve this answer
    
Ahh. I can't believe I made such a simple mistake, Thank you so much! –  Robert Cardona Nov 19 '12 at 3:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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