ConstrainedMin[-2 x1  - x2, 
       {x1 + x2 == 0, x1 - x2 == 0} , {x1, x2}]

solution  =  
      NDSolve[{y''[x]  +  y[x]^2  == 0,  y[0] == 1,  
          y'[0] == 0}, y[x],  {x, 0, 2}]

Plot[Evaluate[y[x]]  /.  solution,  {x, 0, 2}]

symbolicsolution  =  
      DSolve[{y''[x]  +  y[x] ^2 == 0,  y[0] == 1,  
          y'[0] == 0}, y[x],  x]

y[x_]  =  x^2

Plot[y[x], {x, -1, 1}]