Hi erick
in fact erick, there is an error!hehe. I did not realize before.

Em sexta-feira, 10 de junho de 2016 23:38:11 UTC-3, Erik Schnetter escreveu:
>
> When you write `(...)^1/8`, you probably mean `(...)^(1/8)` instead.
>
> -erik
>
> On Fri, Jun 10, 2016 at 10:29 PM, <[email protected] <javascript:>> 
> wrote:
>
>> this is the test for equation differential using runge-kutta45: f(x,y)= 
>> (-5*x - y/5)^1/8 + 10
>>
>>
>> <https://lh3.googleusercontent.com/-D6U4d5pN0pw/V1t3MaV3JpI/AAAAAAAAACU/-E_ceVhrTxkT3SAgmLUy5nHDhRJTIikSgCLcB/s1600/rk45.png>
>>
>> why the numerical result is different? I used :
>>
>> function Rk_JL()
>>  f(x,y)= (-5*x - y/5)^1/8 + 10
>>  tspan = 0:0.001:n
>>  y0 = [0.0, 1.0]
>>  return ODE.ode45(f, y0,tspan);end
>>
>>
>> and
>>
>>
>> function [X1,Y1] = RK_M()
>>  f = @(x,y) (-5*x - y/5)^1/8 + 10;
>>  tspan = 0:0.001:n;
>>  y0 = 1
>>  [X1,Y1]= ode45(f,tspan,1);end
>>
>>
>
>
> -- 
> Erik Schnetter <[email protected] <javascript:>> 
> http://www.perimeterinstitute.ca/personal/eschnetter/
>

Reply via email to