Message Boards Message Boards

0
|
13312 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

Piecewise function does weird things when differentiated

Posted 9 years ago

First of all, when I plot the function like this, I get the seeming discontinuity, but when zooming in, it becomes smaller and smaller, suggesting it's a visual bug (or so I assume, perhaps it's on purpose), but when I then differentiate it, it gives me this, which I did not expect at all looking at the first graph. What's going on here? How can I get the "true" derivative, as it would be if the original function was continuous (and I thought it was, perhaps you guys can also tell whether or not this is indeed the case).

Thanks!

POSTED BY: Frederik Faye
2 Replies
POSTED BY: Hans Dolhaine
Plot[Piecewise[{{1 - Tan[x]/2, 0 <= Tan[x] && Tan[x] < 1}, {Cot[x]/2,1 <= Tan[x]}}, 0], {x, 0, Pi/2}]

enter image description here

POSTED BY: Simon Cadrin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract