# Taylor Series Approximation Help

1. Oct 30, 2007

### rail1090

1. The problem statement, all variables and given/known data

Use the "Three Term" Taylor's approximation to find approximate values y_1 through y_20 with h=.1 for this Initial Value Problem:
y'= cosh(4x^2-2y^2)
y(0)=14

And write a computer program to do the grunt work approximation

2. Relevant equations

3. The attempt at a solution

y_n=cosh(4x^2-2y^2)
y''= (cosh(4x^2-2y^2)(4/3x^3-2/3y^3)
y_0=14
y_n+1=y_n+h{y_ncosh(4x_n^2-2y_n^2)+h^2/2[cosh(4x_n^2-2y_n^2)(4/3x_n^3-2/3y_n^3)]
I'm pretty sure I'm doing this wrong, and I also have no idea how to go about writing a computer program to do this work

2. Oct 31, 2007

### TheoMcCloskey

In the original problem statement, is that the second derivative, ie,

y'' = cosh(4x^2-2y^2)

or is it the first derivative?

3. Oct 31, 2007

### rail1090

wow, my professor changed the IVP to:
y'=xy^3 - cos(x)sin(y)
y(0)= -1
still using h= .1 and looking for y_1 to y_20, as well as writing the program. Apparently the original blew up too quickly.

Last edited: Oct 31, 2007
4. Nov 1, 2007

### TheoMcCloskey

OK. Now to start, what were the various expressions that your prof gave you for approximations to first derivatives. Hint: a two term approx might be

$$y'_{+} = \frac{y_{n+1}-y_{n}}{h} + O(h)$$

then again, it might be

$$y'_{-} = \frac{y_{n}-y_{n-1}}{h} + O(h)$$

Do you remember how your prof established the three point approx?

5. Nov 1, 2007

### rail1090

Thanks for the help Theo, but my problem now lies in the programming bit of the problem. I think I've got the steps before it figured out. Please correct me if I'm wrong.

y''= x3(y^2)y' + y^3 -[(-sin(x)siny) + (cos(x)cos(y)y')]
= 3x(y^2)y' + y^3 +[cos(x)cos(y)y' - sin(x)sin(y)]
y'= (0)(-1)^3- [cos(0)sin(-1)] = sin(-1)
y''= 3(0) + (-1)^3 = [(cos(0)cos(-1)sin(-1)) - (sin(0)sin(-1))]
= -1 + sin(-1)
y_1= (x_0-y_0) = 0-(-1) = 1
y_2= y_1 + (x_1+y_1)h + (x_1+y_1+1)h^2/2
= 1 + (.1+1)(.1) + (.1+1+1).005 = 1.1205
y_3=y_2 + (x_2+y_2)h + (x_2+y_2+1)h^2/2
=1.1205 +(.2+1.1205)(.1) + (.2+1.1205+1).005 = 1.2641525
...

You see, now I have no idea how to go about writing a program for this approximation. What sort of program do I use, and where can I find it? Can I just download one? Is it very complicated to program this?

Last edited: Nov 2, 2007