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.

How can I create a differnce equation from a differential equation? The step size h is not given and should stay a variable. For example $y' = y^2 + x^2$ with the known value $y(1) = 2$

share|improve this question
1  
Depends. What numerical method are you using? Euler? Heun? Runge-Kutta? –  J. M. Feb 8 '12 at 13:25
    
If you are thinking "relatively" small $h$ and looking for approximate solutions, then write $y'(x) \approx \frac{y(x+h)-y(x)}h$. So $y(x+h) \approx y(x) + hx^2 + hy(x)^2$ –  Thomas Andrews Feb 8 '12 at 13:41
    
We are using the Euler method. –  Julian Feb 8 '12 at 13:56

1 Answer 1

Here's a method.

$$y'(1) = 4 + 1^2$$

$$y'(1) = 5$$

$$y'' = 2 y y' + 2x$$

$$y''(1) = 2 ·2· 5 + 2 = 22 $$

$$y''' = 2y'^2+2y y''+2$$

$$y'''(1) = 2 ·25 +2 ·2 ·22 +2 = 130$$

$$y^{(IV)} = 4y' y''+2y y'' + 2y y'''$$

$$y^{(IV)}(1) = 1828$$

You can go on like this. With those values we have a short Taylor Polynomial for y:

$$ 2 + 5(x-1) + 11(x-1)^2 + \frac{65}{3}(x-1)^3+ \frac{457}{3} (x-1)^4$$

share|improve this answer
1  
More generally, there exists a recursively definable sequence of polynomials $p_n(x,y)$ in two variables such that $y^{(n)} = p_n(x,y)$. Then $y(x+h) - y(x) = \sum_{n>0} h^n p_n(x,y)$ for small enough $h$. –  Thomas Andrews Feb 8 '12 at 14:41
    
Specifically, $p_0(x,y)=y$, and $p_{n+1}(x,y) = D_xp_n(x,y) + D_yp_n(x,y)(x^2+y^2)$. Oh, and I forgot a factor of $n!$ in my sum in the previous. –  Thomas Andrews Feb 8 '12 at 14:47

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.