0
$\begingroup$

Below I am giving the code that I am using

lowsol = NDSolve[{y'[x] == 1/(2 y[x]), y[0] == 1/10}, y, {x, 0, 1}, 
   InterpolationOrder -> All];

residual[x_] = y'[x] - 1/(2 y[x]);

Plot[Evaluate[RealExponent[{residual[x] /. lowsol}]], {x, 0, 1}, 
 PlotStyle -> {GrayLevel[0]}, AxesOrigin -> {0, 0}]

I want log plot, thanks!!!

$\endgroup$
  • $\begingroup$ I want log plot but values are all negative. May be try LogPlot[Abs@Evaluate[RealExponent[{residual[x] /. lowsol}]], {x, 0, 1}] $\endgroup$ – Nasser Feb 6 at 18:11
  • $\begingroup$ Dear Nasser, I want the plot y-axes like 10^-5, 10^--10.. $\endgroup$ – user62716 Feb 6 at 18:14
  • $\begingroup$ The errors should be small tend to zero $\endgroup$ – user62716 Feb 6 at 18:19
  • 1
    $\begingroup$ LogPlot[Evaluate[10^RealExponent[{residual[x] /. lowsol}]], {x, 0, 1}, PlotStyle -> {GrayLevel[0]}, AxesOrigin -> {0, 0}]? @Nasser may have meant LogPlot[Evaluate[Abs[{residual[x] /. lowsol}]], {x, 0, 1}, PlotStyle -> {GrayLevel[0]}, AxesOrigin -> {0, 0}] $\endgroup$ – Michael E2 Feb 6 at 20:30
  • $\begingroup$ Many thanks Nasser and Michael both comments are very useful... $\endgroup$ – user62716 Feb 6 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.