Euler method(path s1s2=s2s1)

78 Views Asked by At

Given a differential equation $\frac{dy}{dx}=f(x,y(x)), y(x_0)=y_0$. What is the condition for function of f(x,y) such that the result of $y(x_0+S_1+S_2)$ by using Euler forward method, a step size of $S_1$ follow by step size of $S_2$ will be the same result by reverse order step size $S_2$ follow by $S_1$ and this result is independence of the value of $S_1,S_2$ .

2

There are 2 best solutions below

1
On BEST ANSWER

In the first order of steps, we have,

$ y_{S_1} = y_0 + S_1 f(x_0, y_0) $ $ y_{S_1,S_2} = y_{S_1} + S_2 f(x_{S_1}, y_{S_1}) = y_0 + S_1 f(x_0, y_0) + S_2 f(x_0 + S_1, y_0 + S_1 f(x_0, y_0))$

In other hand, by the reverse order,

$ y_{S_2} = y_0 + S_2 f(x_0, y_0) $ $ y_{S_2,S_1} = y_1 + S_1 f(x_{S_2}, y_{S_2}) = y_0 + S_2 f(x_0, y_0) + S_1 f(x_0 + S_2, y_0 + S_2 f(x_0, y_0))$

We want the same result,

$ y_{S_1,S_2} = y_{S_2,S_1} $

$ y_0 + S_1 f(x_0, y_0) + S_2 f(x_0 + S_1, y_0 + S_1 f(x_0, y_0)) = y_0 + S_2 f(x_0, y_0) + S_1 f(x_0 + S_2, y_0 + S_2 f(x_0, y_0))$

$ (S_1 - S_2) f(x_0, y_0) = S_1 f(x_0 + S_2, y_0 + S_2 f(x_0, y_0)) - S_2 f(x_0 + S_1, y_0 + S_1 f(x_0, y_0))$

Now, we study the autonomous case, i.e., $f(x,y) = f(y)$.

$ (S_1 - S_2) f(y_0) = S_1 f(y_0 + S_2 f(y_0)) - S_2 f(y_0 + S_1 f(y_0))$

It is easy to see that the linear case $f(y) = \lambda y$ satisfies this condition.

Let us assume $f(y)$ is analytic function. Then, by expanding on Taylor series at $y_0$,

$$(S_1 - S_2) f(y_0) = S_1 f(y_0) + S_1 S_2 f(y_0) f'(y_0) + S_1\frac{ S_2^2 (f(y_0))^2}{2} f''(y_0) + S_1\frac{ S_2^3 (f(y_0))^3}{6} f'''(y_0) + \dots - S_2 f(y_0) + S_2 S_1 f(y_0) f'(y_0) - S_2\frac{ S_1^2 (f(y_0))^2}{2} f''(y_0) - S_2\frac{ S_1^3 (f(y_0))^3}{6} f'''(y_0) - \dots$$

By grouping the terms,

$$(S_1 - S_2) f(y_0) = (S_1 - S_2) f(y_0) + (S_1 S_2 - S_2 S_1) f(y_0) f'(y_0) + \frac{S_1 S_2^2 - S_2 S_1^2 }{2}(f(y_0))^2 f''(y_0) + \frac{S_1 S_2^2 - S_2 S_1^3 }{6}(f(y_0))^3 f'''(y_0) + \dots$$

So,

$$ \sum\limits_{k=2}^{\infty} {\frac{S_1 S_2^k - S_2 S_1^k }{k!}(f(y_0))^k \frac{d^k f}{d y^k}(y_0) } = 0 $$

Since the result must to be independent of $S_1$ and $S_2$,

$f(y_0) = 0, $

or

$\frac{d^k f}{d y^k}(y_0) = 0, \quad \forall k \geq 2.$

Observe the linear function $f(y) = \lambda y$ satisfies the second condition.

For a more general case $f(x,y)$, you can use Taylor series expansion of a function of two variables. If you are interested in other particular form, for example, $f(x,y) = g(x) + h(y)$, you can use the same idea.

Note that we can not yet say anything about the next steps.

0
On

enter image description here

I got it in this case this will only be true if $f(x+x2,y+y2)=f(x,y)+x_2f_x+f_yy_2$ hence f(x,y)=ax+by+cx i use other notation here but suppose to be the same thing.