# 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, $X(p)$, defined by:

$
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 $X$ and $p$, which is split into three regions:
• In the region where (equivalently ), they are related by $X + p = 5$;
• In the region $4\leq p < 8$ (equivalently $0 < X \leq 1$), they are related by $4X + p = 8$.
• In the region $p\geq 8$, $X = 0$.
(A little technical point: I've used a lot of $\leq$ and $\geq$signs in this definition - this is mostly okay as the function is continuous; At $p = 4 \& 8$, both expressions for $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, $p(X)$:

$
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: $p(X)$ is not defined for $X=0$ (it takes infinitely many values here!), or for $X<0$ as $X$ is never negative.)

- - -

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

$R = Xp$

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

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

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

$
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 $M_R = \frac{dR}{dX}$:

$
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.