Skip to main content
added 501 characters in body
Source Link
Bob Hanlon
  • 162.7k
  • 7
  • 81
  • 205
solu = NDSolve[{-z''[t] == (Sin[2 + z[t]] z[t]^2)/(1 + t)^(9/2), z[0] == 0, 
     z'[10000] == 0}, z, {t, 0, 10000}, 
    Method -> {"Shooting", 
      "StartingInitialConditions" -> {z[0] == 0, z'[0] == 15/100}}][[1]];

LogLinearPlot[z[t] /. solu, {t, 0.1, 10000}]

enter image description here

Since the values are so small, Using Chop returns zero ("Chop uses a default tolerance of 10^-10").

With higher precision the values are even smaller

solu = NDSolve[{-z''[t] == (Sin[2 + z[t]] z[t]^2)/(1 + t)^(9/2), z[0] == 0, 
     z'[10000] == 0}, z, {t, 0, 10000}, 
    Method -> {"Shooting", 
      "StartingInitialConditions" -> {z[0] == 0, z'[0] == 15/100}},
    WorkingPrecision -> 20][[1]];

LogLinearPlot[z[t] /. solu, {t, 1/10, 10000},
 WorkingPrecision -> 20]

enter image description here

solu = NDSolve[{-z''[t] == (Sin[2 + z[t]] z[t]^2)/(1 + t)^(9/2), z[0] == 0, 
     z'[10000] == 0}, z, {t, 0, 10000}, 
    Method -> {"Shooting", 
      "StartingInitialConditions" -> {z[0] == 0, z'[0] == 15/100}}][[1]];

LogLinearPlot[z[t] /. solu, {t, 0.1, 10000}]

enter image description here

Since the values are so small, Using Chop returns zero ("Chop uses a default tolerance of 10^-10").

solu = NDSolve[{-z''[t] == (Sin[2 + z[t]] z[t]^2)/(1 + t)^(9/2), z[0] == 0, 
     z'[10000] == 0}, z, {t, 0, 10000}, 
    Method -> {"Shooting", 
      "StartingInitialConditions" -> {z[0] == 0, z'[0] == 15/100}}][[1]];

LogLinearPlot[z[t] /. solu, {t, 0.1, 10000}]

enter image description here

Since the values are so small, Using Chop returns zero ("Chop uses a default tolerance of 10^-10").

With higher precision the values are even smaller

solu = NDSolve[{-z''[t] == (Sin[2 + z[t]] z[t]^2)/(1 + t)^(9/2), z[0] == 0, 
     z'[10000] == 0}, z, {t, 0, 10000}, 
    Method -> {"Shooting", 
      "StartingInitialConditions" -> {z[0] == 0, z'[0] == 15/100}},
    WorkingPrecision -> 20][[1]];

LogLinearPlot[z[t] /. solu, {t, 1/10, 10000},
 WorkingPrecision -> 20]

enter image description here

Source Link
Bob Hanlon
  • 162.7k
  • 7
  • 81
  • 205

solu = NDSolve[{-z''[t] == (Sin[2 + z[t]] z[t]^2)/(1 + t)^(9/2), z[0] == 0, 
     z'[10000] == 0}, z, {t, 0, 10000}, 
    Method -> {"Shooting", 
      "StartingInitialConditions" -> {z[0] == 0, z'[0] == 15/100}}][[1]];

LogLinearPlot[z[t] /. solu, {t, 0.1, 10000}]

enter image description here

Since the values are so small, Using Chop returns zero ("Chop uses a default tolerance of 10^-10").