# Why doesn’t Plot draw function within prescribed range?

I have a function:

TheoreticalFunction[x_] = 2 / Pi * ArcSin[x]

And trying to plot its derivative:

Plot[TheoreticalFunction'[z], {z, 0, 1}]

How to plot this from 0 to 1? Why does Plot function stop drawing about 0.9?
Thanks.

=================

=================

2

=================

The derivative of your function has a discontinuity for x=1x=1.

theoreticalFunction[x_] := 2/Pi * ArcSin[x]
D[theoreticalFunction[x], x]

(* Out: 2/(Pi Sqrt[1 – x^2]) *)

Plot uses internal methods that try to plot “most” points within the domain given, removing “outliers”. This method detects that your derivative rises to infinity for x=1x=1 and clips that region out of the plot, as you can see by asking Plot to specifically mention where clipping has happened:

Plot[
D[theoreticalFunction[x], x], {x, 0.9, 1},
ClippingStyle -> Directive[Red, Thick, Dashed], Evaluated -> True
]

You can force Plot to show all points within the region by using PlotRange. Because of the large values involve, let me plot the 10-logarithm of your derivative instead:

LogPlot[Evaluate@D[theoreticalFunction[x], x], {x, 0, 1}, PlotRange -> Full]

Plot[EmpiricalFuntion'[z], {z, 0, 1}, PlotRange -> All]

And you’ll see why Mathematica automatically truncates your plot.

Perhaps you’d like:

Plot[EmpiricalFuntion'[z], {z, 0, 1}, PlotRange -> {0,1}]

Thanks. Understood I have to change my question.
– instajke
May 23 ’15 at 19:31