I am newbie at Mathematica but I need to solve differential equation so I took my chances and tried to use this powerful tool to solve this equation: $$\frac{d}{dx}\left([\cos(2\pi x)+1]\frac{du(x)}{dx}\right) = 0$$ $$x \in[0,1]$$ $$\frac{du(0)}{dx}+u(0)=1$$ $$u(1)=0$$
So I read that I should use NDSolve to solve differential equations.
I wrote:
eqn = {(D[((Cos[2*Pi*x] + 1)*D[y[x], x]), x] == 0),
D[y[0], x] + y[0] == 1, y[1] == 0}
sol = NDSolve[eqn, y, {x, 0, 1}]
But I am getting:
NDSolve::mxst: Maximum number of 10000 steps reached at the point x == 0.49999990622587265. >>
NDSolve::berr: "There are significant errors {0.,0.017511} in the boundary value residuals. Returning the best solution found"
NDSolve::mxst: Maximum number of 10000 steps reached at the point x == 0.4999999052334023
.
How to avoid this errors and my program run and succeed?
MaxSteps ->100
instead of 100 you can use other numbers. $\endgroup$ – MOON Dec 27 '14 at 22:39NDSolve::mxst: Maximum number of 100 steps reached at the point x == 0.46504538392462047
. >> $\endgroup$ – Marcin Majewski Dec 27 '14 at 22:46NDSolve
is encountering a singularity whereCos[2*Pi*x] + 1
is equal to zero. $\endgroup$ – bbgodfrey Dec 27 '14 at 22:49