This question already has an answer here:
I have the following function defined:
IntImpTri[r1_, r2_, r_] :=
Piecewise[{
{((4/((r2 - r1)^2)) ((r^2 - r1^2)/2 - r1 (r - r1))),
r >= r1 && r < ((r1 + r2)/2)},
{(1/2 - (2/((r2 - r1)^2)) (r^2 - ((r1 + r2)/2)^2) +
(4/((r2 - r1)^2)) r2 (r - ((r1 + r2)/2))),
r >= ((r1 + r2)/2) && r < r2},
{1, r >= r2}}, 0];
I am using Mathematica 9 and I do not understand why, when I try to plot this function, which is the integral function of a triangle pulse, the figure shows an interruption in the line.
If I try the following command: Plot[IntImpTri[0, 4, r], {r, -1, 5}]
, I get the following output:
There is a discontinuity around x=2
but the piecewise covers everything!
Plot[IntImpTri[0, 4, r], {r, -1, 5}, PlotPoints -> 300]
– chuy Apr 30 at 21:45