Predictor-corrector, starting values with Taylor method

In summary: Now, we can use this value as our starting point for the predictor-corrector method. I hope this helps! Let me know if you have any further questions. In summary, we can solve this ODE using the Taylor method to find the first starting value, and then continue with the predictor-corrector method.
  • #1
Wyrm
1
0

Homework Statement


Hi! I need to solve the following ODE:

[tex]xy'=1-y+x^2y^2, \qquad y(0)=1[/tex]

using a predictor-corrector method. Starting values need to be found using a Taylor method.
The exact solution is of the form [tex]\frac{\tan{x}}{x}[/tex]

Homework Equations



Taylor method of third order (for 1st starting value):

[tex]y_1=y_0+hy_0'+\frac{h^2}{2}y_o''+\frac{h^3}{6}y_o'''[/tex]

The Attempt at a Solution


Right here I bumped into a problem: in order to evaluate the 1st starting value (for example, if I'm using Adams-Bashforth 3rd order as a predictor and Adams-Moulton 3rd order method as a corrector) I get the following:

[tex]y'=\frac{1}{x}-\frac{y}{x}+xy^2[/tex]

Dividing with [tex]x=0[/tex] in order to get yields infinity :(. Any help would be appreciated.
 
Physics news on Phys.org
  • #2


Hello! Thank you for sharing your problem. Solving ODEs using numerical methods can be challenging, but I'm sure we can figure it out together.

To start, let's review the Taylor method of third order. This method uses the first, second, and third derivatives of the function at the initial point to approximate the solution. In this case, we have y'=1-y+x^2y^2. We can rewrite this as:

y'=1-y+x^2y^2
y'=1-y+x^2(y^2)

Now, let's find the derivatives:

y'= -1 + 2xy^2 + x^2(2yy')
y''= 4xy + 2x^2y' + 2xy(y')
y'''= 4y + 2x + 2x^2(y') + 2xy(y'') + 2xy'(y')

We can substitute these into the Taylor method formula:

y_1=y_0+hy_0'+\frac{h^2}{2}y_o''+\frac{h^3}{6}y_o'''
y_1= y_0 + h(-1 + 2xy_0^2 + x^2(2yy')) + \frac{h^2}{2}(4xy_0 + 2x^2y_0' + 2xy_0(y')) + \frac{h^3}{6}(4y_0 + 2x_0 + 2x^2(y_0') + 2xy_0(y'') + 2xy_0'(y'))

Now, we can plug in our initial condition, y(0)=1, to get our first starting value:

y_1= 1 + h(-1 + 2(0)^2 + (0)^2(2(1)(0))) + \frac{h^2}{2}(4(0)(1) + 2(0)^2(0) + 2(0)(0)) + \frac{h^3}{6}(4(1) + 2(0) + 2(0)^2(0) + 2(0)(0) + 2(0)(0))

Simplifying, we get:

y_1= 1 - h + \frac{h^3
 

Related to Predictor-corrector, starting values with Taylor method

1. What is a predictor-corrector method?

A predictor-corrector method is a numerical algorithm used to approximate the solution of a differential equation. It involves making an initial prediction of the solution using a simple method, such as Euler's method, and then refining this prediction using a more accurate method, such as the Taylor method.

2. What are starting values in the context of the Taylor method?

Starting values refer to the initial conditions of a differential equation that are used as the starting point for the Taylor method. These values, such as the initial position and velocity in a physics problem, are necessary for calculating subsequent values of the solution.

3. How does the predictor-corrector method improve upon the Taylor method?

The Taylor method is a high-order accurate method for solving differential equations, but it requires a large number of function evaluations. The predictor-corrector method improves upon this by using a lower-order method, such as Euler's method, for the initial prediction and then refining this prediction using the Taylor method. This reduces the overall number of function evaluations while still maintaining a high level of accuracy.

4. What is the role of starting values in the predictor-corrector method?

In the predictor-corrector method, starting values are used to make an initial prediction of the solution using a lower-order method. Without these values, the method would not be able to make an accurate prediction and would not be able to improve upon it using the Taylor method.

5. How do I choose appropriate starting values for the predictor-corrector method?

The choice of starting values depends on the specific differential equation being solved. In general, starting values should be chosen to represent the initial conditions of the problem and should be in a range that is appropriate for the solution. It may be necessary to experiment with different starting values to find the most accurate solution.

Similar threads

  • Calculus and Beyond Homework Help
Replies
6
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
250
  • Calculus and Beyond Homework Help
Replies
9
Views
807
  • Calculus and Beyond Homework Help
Replies
2
Views
758
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
6
Views
300
  • Calculus and Beyond Homework Help
Replies
2
Views
895
  • Calculus and Beyond Homework Help
Replies
3
Views
787
Back
Top