I tried to solve this differential equation:
ϵy″(x)+xy′(x)=−ϵπ2cos(πx)−πxsin(πx)
with boundary conditions: y(−1)=−2, y(1)=0. If we take ϵ=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 ϵ, 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 ϵ=0.0001.
Thank you.
Comments
Post a Comment