The derivative of piecewise-defined function gives undefined in knot point

882 Views Asked by At

I have defined a (rather simple) piecewise-defined function in Maple.

But when I am finding the derivative to the piecewise-defined function, it suddenly sets the 'knot point' as undefined even though the function is continuously defined.

What am I doing wrong? First, the function in first interval was $P_1(Q) = -0.5 \, Q+200$ which gave me Float(undefined) in the 'knot point' in the derivative, so I changed $0.5$ to $\frac{1}{2}$ which now gives me just undefined.

enter image description here

Edit

Now I have plotted (1) and (3). As you say, I can clearly see that there is a 'problem' in $Q=120$. But if $MR(Q)$ is undefined in $Q=120$, why is Maple still drawing a line in this point?

In $P(Q)$ from (1) the function is $P(Q) = -\frac{1}{2} Q + 200$ in both $Q < 120$ and $Q = 120$. Why is $MR(Q)$ not just $-Q+200$ in the exact same interval ($Q \leq 120$)?

You say that I get different results whether I substitute $Q=120$ into first and third part in (3) but how does it matter when third part is not defined for $Q=120$? I would have thought the line in the plot would just jump from $(Q,MR(Q))=(120,-120+200)$ to $(Q,MR(Q))=(121,-2 \cdot 121+260)$ when it goes from $Q=120$ to $Q=121$ and the vertical line in $Q=120$ would not be there.

enter image description here

1

There are 1 best solutions below

0
On

Maple is correct, your function $(2)$ is not differentiable at $Q=120$. To see this, look at your formula $(3)$. If you substitute $Q=120$ into the first and third parts of the formula, you get two different answers. This means that the two separate parts of $(2)$ meet at a "sharp point", and the function is continuous but not differentiable at the join. If you plot $(2)$, which should be easy on Maple, you will see what I mean.