How to add "erf()" part to the ode solution?
조회 수: 1 (최근 30일)
I have the ODE : y' = -x+2+10*e^(10*(x-1)^2)
I have numeric solution of below:
I have a analytical solution of ODE below:
y (x)= C1 + 2*x - x^2/2 + (10^(1/2)*pi^(1/2)*erfi(10^(1/2)*(x - 1)))/2, y(0)=1
when I plot the analytical solution without "erfi()" part, the graph is below:
The curve is similar to numarical solution but there is evident error. I think, this error is because of "erf" part of the analytical solution. How can I plot the analytical solution with the "erf()" part. Thank you.