Are there any convenient tool for plotting solutions of perturbation (differential) equation?

43 Views Asked by At

For example, I want to plot solutions of $\epsilon y ''-2(\tan x)y'+y=0, y(-1)=y(1)=1$. for different small $\epsilon$. I tried to do this in mathematica online. But the Dsolve function returned a Dsolve type and did not give me a concrete solution as it did with its examples(I set $\epsilon=0.01$). Can anyone help me out on this? Thanks!

1

There are 1 best solutions below

0
On

As mentioned in comments, you can use NDSolve to solve your ode numerically.

ODE = e1*y''[x] - 2*Tan[x]*y'[x] + y[x] == 0;
bcs = {y[-1] == 1, y[1] == 1};
e1 = 0.1;
sol = NDSolve[{ODE, bcs}, y[x], {x, -1, 1}]
Plot[Evaluate[y[x] /. sol], {x, -1, 1}]

enter image description here