title: mathematica ndsolve: infinite expression 1/0. encountered
body: <p>I am trying to use ndsolve to find the the shape of a liquid surface when it spins at an angular velocity w (including the effects of surface tension), but it seems that there is a singularity in r=0. </p>
  
  <pre><code>\[Gamma]0 := 0.42541
  \[Gamma]1 := 0.456
  g := 9.81
  \[Rho] := 1000.00
  zInit := 1
  r0 := 1
  w := 2
  sol = NDSolve[{\[Gamma]0*(z'[r]*(1 + (z'[r])^2) + 
         r*z''[r]) == (r*(1 + (z'[r])^2)^(3/2))*(2*\[Gamma]1/
           r0 + \[Rho] (g*(z[r] - zInit) - 1/4*w^2*(r0^2 - 2*r^2))), 
     z'[0] == 0, z'[r0] == Cos[140 Degree]}, z[r], {r, 0, r0}]
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Power::infy: Infinite expression 1/0. encountered. &gt;&gt;
  Infinity::indet: Indeterminate expression 0. ComplexInfinity encountered.
  Power::infy: Infinite expression 1/0. encountered. &gt;&gt;
  Infinity::indet: "Indeterminate expression 0.` ComplexInfinity encountered. 
  NDSolve::ndnum: Encountered non-numerical value for a derivative at r == 0.`. 
  </code></pre>
  
  <p>I tried substituting the 0 with a small number like 10^-4, but then the graph  blows up ridiculously in the order of 10^40. I've tried things like changing the initial conditions to (z[r0]==0,z'[r0]==Cos[140 Degree]) and also tried StiffnessSwitching and setting up starting points, but none of those seemed to help (the graph blows up like the picture below). Any help?</p>
  
  <p>Some failed attepmts:</p>
  
  <pre><code>\[Rho] := 1000.00
  zInit := 1
  r0 := 1
  w := 2
  sol = NDSolve[{\[Gamma]0*(z'[r]*(1 + (z'[r])^2) + 
         r*z''[r]) == (r*(1 + (z'[r])^2)^(3/2))*(2*\[Gamma]1/
           r0 + \[Rho] (g*(z[r] - zInit) - 1/4*w^2*(r0^2 - 2*r^2))), 
     z[r0] == 0, z'[r0] == Cos[140 Degree]}, z[r], {r, 0, r0}, 
    Method -&gt; "StiffnessSwitching"]
  </code></pre>
  
  <p><a href="http://i.stack.imgur.com/aab5l.png" rel="nofollow">http://i.stack.imgur.com/aab5l.png</a></p>