I tried to solve this differential equation:
$$\epsilon y''(x)+xy'(x)=-\epsilon \pi^2 \cos(\pi x)-\pi x\sin(\pi x)$$
with boundary conditions: $y(-1)=-2, \space y(1)=0$. If we take $\epsilon=0.1$, Mathematica can solve it without any trouble
Block[{e = 0.1, min = -1, max = 1},
Plot[Evaluate[
y[x] /. NDSolve[{e y''[x] +
y'[x] x == -e Pi^2 Cos[Pi x] - Pi x Sin[Pi x],
y[min] == -2, y[max] == 0}, y, {x, min, max}]], {x, min, max}]
]
But if we want a smaller $\epsilon$, let say 0.01, Mathematica seems unable to handle it. Is there any options to invoke or methods to employ to get the desired result? Anyway, this is the solution for $\epsilon=0.0001$.
Thank you.
Comments
Post a Comment