# Thread: equation derivative problem

1. ## equation derivative problem

Hello! I need your help over a little thing.
I have a function of this type

X= 5-p if p<4
2- p/4 if 4<=p< 8
0 if p> = 8

knowing that R=X *p
and MR= R' (meaning derivative, and expressing the p in terms of the X)
I have
MR= 8- 8X if 0<X<1
5 -2X if X>=1
My problem is in the MR.
I get why we have the value 8-8X and so on, but I do not get how to have the if part. How do we pass from the if part written in terms of p, to the if part written in terms of X? Thanks for all your help.

2. Here is one way to think about this problem:

You are given a function, $\displaystyle X(p)$, defined by:

$\displaystyle X(p)= \left\{ \begin{array}{ll} 5-p & \textrm{if~~} p<4\\ 2 - \frac{p}{4} & \textrm{if~~} 4\leq p<8\\ 0 & \textrm{if~~} p\geq 8 \end{array} \right.$

(This is shown in the attached graph, below.)

Now, instead of tying up one quantity as a function of the other, we can view this as a relationship between the quantities $\displaystyle X$ and $\displaystyle p$, which is split into three regions:
• In the region where (equivalently ), they are related by $\displaystyle X + p = 5$;
• In the region $\displaystyle 4\leq p < 8$ (equivalently $\displaystyle 0 < X \leq 1$), they are related by $\displaystyle 4X + p = 8$.
• In the region $\displaystyle p\geq 8$, $\displaystyle X = 0$.
(A little technical point: I've used a lot of $\displaystyle \leq$ and $\displaystyle \geq$signs in this definition - this is mostly okay as the function is continuous; At $\displaystyle p = 4 \& 8$, both expressions for $\displaystyle X(p)$ give the same value.)

By looking at the problem in this way, we can try to describe the relationship with an inverse function, $\displaystyle p(X)$:

$\displaystyle p(X)= \left\{ \begin{array}{ll} 8- 4X & \textrm{if~~} 0< X\leq1\\ 5-X & \textrm{if~~} X>1\\ \end{array} \right.$

(Another small technical point: $\displaystyle p(X)$ is not defined for $\displaystyle X=0$ (it takes infinitely many values here!), or for $\displaystyle X<0$ as $\displaystyle X$ is never negative.)

- - -

That was a bit of excess detail, but it pays off now. You are asked to consider a quantity called $\displaystyle R$:

$\displaystyle R = Xp$

A big question is: what is $\displaystyle R$ a function of? $\displaystyle X$? $\displaystyle p$? Both?

The answer is, we can make it whichever we want! By expressing $\displaystyle X$ in terms of $\displaystyle p$, we can make $\displaystyle R = R(p)$ only; but by expressing $\displaystyle p$ in terms of $\displaystyle X$, we can make $\displaystyle R = R(X)$ only.

Let's do the latter, and make $\displaystyle R = R(X) = X \cdot p(X)$:

$\displaystyle R(X)= \left\{ \begin{array}{ll} 8X- 4X^2 & \textrm{if~~} 0< X\leq1\\ 5X-X^2 & \textrm{if~~} X>1\\ \end{array} \right.$

Now, evaluate the derivative $\displaystyle M_R = \frac{dR}{dX}$:

$\displaystyle M_R(X)= \left\{ \begin{array}{ll} 8- 8X & \textrm{if~~} 0< X\leq1\\ 5-2X & \textrm{if~~} X>1\\ \end{array} \right.$

as required.