Finding expression so that a piecewise function would be differentiable?

40 Views Asked by At

Given the function: $$f(x)=\begin{cases}3&\text{if}~x\geq1;\\p(x)&\text{if}~0\lt x\lt1;\\e^x&\text{if}~x\leq0.\\\end{cases}$$

What I believe is that $p(x)$ would be a polynomial with points at $(0,1)$ and $(1,3)$.

Also, the slope of the tangent line of $p(x)$ at $x=0$ would be $1$ while at $x=1$ it would be $0$.

How would you find $p(x)$ so that the function is differentiable?

1

There are 1 best solutions below

0
On

To satisfy $p(0)=1$ and $p'(0)=1$, it follows: $$p(x)=q(x)+x+1$$ and $$p'(x)=q'(x)+1$$ where $q(x)$ would a polynomial with no constant term.

To satisfy $p(1)=3$, $~q(1)$ must be equal to $1$.

Similarly, to satisfy $p'(1)=0$, $~q'(1)$ must be equal to $-1$.

Now, let $q(x)=ax^3-bx^2$.

Therefore, $q'(x)=3ax^2-2bx$.

Therefore: $$q(1)=1=a-b$$ $$q'(1)=-1=3a-2b$$

Solving simultaneously, it follows that $a=-3$ and $b=-4$.

Therefore, an expression for $p(x)$ would be $-3x^3+4x^2+x+1$.