Hello, I'd like to solve this equation with Neumann boundary conditions. My code below does not work. Am I doing something bad or is it a failure of the Newton algorithm ?
*# solves u" = (exp(u)-exp(-u))-2u'/(x+1) , u'(0)=-1, u(1)=0* *x=Fun(identity, Interval(0.,1.))* *d=x.domain* *B=neumann(d)* *D=diff(d)* *# Solves Lu + g(u)-1==0* *L = D^2 + 2/(x.+1)*D* *g = u -> -(exp(u)-exp(-u)); gp = u -> -(exp(u)+exp(-u))* *u=-0.3*x+0.5** #initial guess * *for k=1:5 # this crashes if Ii increase the number of iterations* * u=u-[B,L+gp(u)]\[-1.,0.,L*u+g(u)];* *end* The solution should look like that : <https://lh5.googleusercontent.com/-BCYNzh8ckCA/U6VIJcT2-tI/AAAAAAAAAGI/r08hknI2EIg/s1600/Screenshot+from+2014-06-21+10%3A37%3A46.png>
