Numerical Methods: Taylor Series for Diff Equation

In summary, the conversation discusses using a Taylor-series expansion to solve a differential equation and obtain the value of y at a specific point. The process involves assuming a solution in the form of a Taylor series, differentiating it to get values for the coefficients, and then substituting these values into the equation to solve for higher order derivatives. The conversation also includes a discussion on how to correctly apply implicit differentiation techniques when dealing with higher order derivatives.
  • #1
phyzmatix
313
0

Homework Statement



Solve the differential equation

[tex]\frac{dy^2}{dx^2}=xy^2-2yy'+x^3+4[/tex]

where

[tex]y(1)=1[/tex]
[tex]y'(1)=2[/tex]

by means of the Taylor-series expansion to get the value of y at x=1.1. Use terms up to [tex]x^6[/tex] and [tex]\Delta x=0.1[/tex]

The Attempt at a Solution



I'm unsure as to how I should go about determining the coefficients for the Taylor expansion from the given equation. What I mean is that I don't know how to apply implicit differentiation techniques to higher order derivatives as in this case. Do we treat the derivatives in the equation as if they were variables? In other words, should I differentiate as follows (I'm using brackets to easier relate the the original term above to my subsequent derivative of said term):

[tex]\frac{dy^3}{dx^3}=(y^2+2xyy')-(2y'+2yy'')+3x^2[/tex]

?

Perhaps there's even an easier way that I'm missing?
Any help will be greatly appreciated.

phyz
 
Last edited:
Physics news on Phys.org
  • #2
Anybody?
 
  • #3
Is the idea to assume a solution in the form of a Taylor series and solve for the coefficients? If so, just write out the series, differentiate it to get y' and y'', plug them into the differential equation, and then solve for the coefficients by matching powers of (x-1).
 
  • #4
Hi Vela!

Well, following the simple example in my textbook (why do they always give the straightforward examples?) we use a standard Taylor series expansion

[tex]y(x)=y(x_0)+y'(x_0)(x-x_0)+\frac{y''(x_0)}{2!}(x-x_0)^2+\frac{y'''(x_0)}{3!}(x-x_0)^3+\frac{y^{(4)}(x_0)}{4!}(x-x_0)^4+\frac{y^{(5)}(x_0)}{5!}(x-x_0)^5+\frac{y^{(6)}(x_0)}{6!}(x-x_0)^6[/tex]

where, if we let [tex]h=x-x_0[/tex] we'll end up with

[tex]y(x)=y(x_0)+y'(x_0)h+\frac{y''(x_0)}{2}h^2+\frac{y'''(x_0)}{6}h^3+\frac{y^{(4)}(x_0)}{24}h^4+\frac{y^{(5)}(x_0)}{120}h^5+\frac{y^{(6)}(x_0)}{720}h^6[/tex]

after which the idea then is to determine the derivatives of y(x) in order to obtain values for the coefficients of h, i.e. we know that

[tex]y(1)=1[/tex]
[tex]y'(1)=2[/tex]

so that

[tex]\frac{d^2y}{dx^2}(1)=xy^2-2yy'+x^3+4=(1)(1)^2-2(1)(2)+(1)^3+4=2[/tex]

we must then obtain the equation for y''' from y'' and substitute the values for

[tex]y(1)=1[/tex]
[tex]y'(1)=2[/tex]
[tex]y''(1)=2[/tex]

into this equation, giving us the value for y''' which will help us determine the coefficient of [tex]h^3[/tex] in our Taylor series. So we continue until we have all the coefficients, finally substituting the value x=1.1 into the place of h to obtain the desired value of y.

Does that make sense?

My issue is that I do not know how to differentiate

[tex]\frac{d^2y}{dx^2}(1)=xy^2-2yy'+x^3+4[/tex]

...

phyz
 
  • #5
phyzmatix said:

The Attempt at a Solution



I'm unsure as to how I should go about determining the coefficients for the Taylor expansion from the given equation. What I mean is that I don't know how to apply implicit differentiation techniques to higher order derivatives as in this case. Do we treat the derivatives in the equation as if they were variables? In other words, should I differentiate as follows (I'm using brackets to easier relate the the original term above to my subsequent derivative of said term):

[tex]\frac{dy^3}{dx^3}=(y^2+2xyy')-(2y'+2yy'')+3x^2[/tex]
That's almost correct. Remember you're differentiating with respect to x, so when you differentiate 2yy', you get

[tex]\frac{d}{dx}(2yy') = 2(\frac{dy}{dx})y'+2y(\frac{dy'}{dx}) = 2y'^2+2yy''[/tex]
 
  • #6
vela said:
That's almost correct. Remember you're differentiating with respect to x, so when you differentiate 2yy', you get

[tex]\frac{d}{dx}(2yy') = 2(\frac{dy}{dx})y'+2y(\frac{dy'}{dx}) = 2y'^2+2yy''[/tex]

First of all, thanks for your help, I truly appreciate it.

If you don't mind checking one last time though (I'm learning something new here, please bear with me :smile:).

We differentiated

[tex]\frac{dy^2}{dx^2}=xy^2-2yy'+x^3+4[/tex]

and got

[tex]\frac{dy^3}{dx^3}=(y^2+2xyy')-(2y'^2+2yy'')+3x^2[/tex]
[tex]\frac{dy^3}{dx^3}=y^2+2xyy'-2y'^2-2yy''+3x^2[/tex]

Differentiating this yet again, should then give

[tex]\frac{d^4y}{dx^4}=2y\frac{dy}{dx}+(2yy'+2x\frac{dy}{dx}y')-4\frac{dy'}{dx}-(2\frac{dy}{dx}y''+2y\frac{dy''}{dx})+6x[/tex]
[tex]\frac{d^4y}{dx^4}=2yy'+(2yy'+2xy'y')-4y''-(2y'y''+2yy''')+6x[/tex]
[tex]\frac{d^4y}{dx^4}=4yy'+2xy'^2-4y''-2y'y''-2yy'''+6x[/tex]

Am I right? If this is correct, then I think I finally get it.

Thanks again!
phyz
 
  • #7
Not quite. When you differentiated 2xyy', you should get three terms, not two, because there are three factors. You also forgot to use the chain rule when differentiating 2y'2.
 
  • #8
vela said:
Not quite. When you differentiated 2xyy', you should get three terms, not two, because there are three factors. You also forgot to use the chain rule when differentiating 2y'2.

Cheers Vela...This thing is going to get really, really nasty towards [tex]\frac{y}{(6)}[/tex] isn't it?

Guess I have to try again...:grumpy:
 
Last edited:

1. What is a Taylor series and how is it used in numerical methods?

A Taylor series is a mathematical series that represents a function as an infinite sum of terms. In numerical methods, Taylor series are often used to approximate the solutions of differential equations by breaking them down into a series of simpler calculations.

2. How is a Taylor series used to solve differential equations?

A Taylor series can be used to solve differential equations by approximating the solution at a given point using the values of the function and its derivatives at that point. By using more terms in the series, a more accurate approximation can be obtained.

3. What is the order of a Taylor series and why is it important?

The order of a Taylor series refers to the number of derivatives used in the series. It is important because the more derivatives that are included, the more accurate the approximation will be. However, using a higher order Taylor series also means more calculations and potentially longer computing time.

4. What are some applications of Taylor series in numerical methods?

Taylor series are commonly used in numerical methods for solving differential equations in various fields such as physics, engineering, and economics. They are also used in computer graphics to create smooth curves and surfaces.

5. Can a Taylor series always provide an exact solution for a differential equation?

No, a Taylor series can only provide an approximate solution for a differential equation. The accuracy of the approximation depends on the number of terms used in the series and the value of the point being approximated. In some cases, a Taylor series may also diverge and provide inaccurate results.

Similar threads

  • Calculus and Beyond Homework Help
Replies
27
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
  • Calculus and Beyond Homework Help
Replies
12
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
818
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
Replies
2
Views
1K
Back
Top