0

Why do we have to divide by the solution when plotting the results from NDsolve?

For example, given

ode1 = {y''[x] + Sin[y[x]] == 0, y[0] == 2, y'[0] == 1};
sol = NDSolve[ode1, y, {x, -10, 10}]

Then the following plots the solution.

Plot[y[x] /. sol, {x, -10, 10}]

Why must we include /.sol? What are we actually dividing by?

m0nhawk
  • 3,867
  • 1
  • 20
  • 35
Dr. Dilly
  • 1
  • 1

0 Answers0