# "very difficult" piece function question

• October 12th 2007, 01:38 PM
polymerase
"very difficult" piece function question
Hey, how would i do a question like this:

Find the equation of the line that is tangent to the curve $f(x)$ at two points.

$f(x)=(x+3)^2\quad for\;x<0 \qquad -x^2+8x-4\quad for\;x\ge 0$

Thanks
• October 12th 2007, 02:43 PM
ticbol
Sketching the piece-wise function on paper, I found it to be of two vertical parabolas, where it opens upward in the interval x < 0, and it opens downward in the interval x >= 0.

There is no way a tangent line is to be tangent to both broken parabolas. Even at x = 0, where the y-axis is appears to be "tangent" to both broken parabolas, the y-axis, or the vertical line x=0, does not really touch the f(x) = (x+3)^2 parabola because the f(x) there is not defined.

Let us see algebraically.

There is only one tangent line, so the slope is the same everywhere on the line.

Its slope when tangent to f(x) = (x+3)^2,
m1 = f'(x) = 2(x+3)

Its slope when tangent to f(x) = -x^2 +8x -4,
m2 = f'(x) = -2x +8

m1 = m2
2(x+3) = -2x +8
2x +2x = 8 -6
x = 2/4 = 1/2
So,
m1 = 2(0.5 +3) = 7
m2 = -2(0.5) +8) = 7

The tangent line then is y = 7x +b.
Or f(x) = 7x +b -----------------------(1)

Substitute that into f(x) = (x +3)^2,
7x +b = (x +3)^2
7x +b = x^2 +6x +9
b = x^2 -x +9 ---------------------(i)

Substitute (1) into f(x) = -x^2 +8x -4,
7x +b = -x^2 +8x -4
b = -x^2 +x -4 ---------------------------(ii)

b from (i) = b from (ii),
x^2 -x +9 = -x^2 +x -4
2x^2 -2x +13 = 0
x = {2 +,-sqrt[2^2 -4(2)(13)]} / (2*2)
x = (2 +,- sqrt[-100] /4
Imaginary ??

Therefore, no such common tangent line. -------------answer.
• October 12th 2007, 02:56 PM
galactus
Let $A(a,(a+3)^{2})$ be a point on $y=(x+3)^{2}$

The derivative is $y'=2(x+3)$, so the slope at x=a is:

$2(a+3)$.

Let $P(p,-p^{2}+8p-4)$ be a point on $-x^{2}+8x-4$.

derivative is $-2x+8$. Slope at x=p is $-2p+8$

The slope have to be the same, so we have:

$2(a+3)=-2p+8$

$p=1-a$..............[1]

The slope of the line AP is then:

$\frac{(a+3)^{2}-(-p^{2}+8p-4)}{a-p}$

$\frac{a^{2}+6a+p^{2}-8p+13}{a-p}$

This has to equal the slope at A, so:

$\frac{a^{2}+6a+p^{2}-8p+13}{a-p}=2(a+3)$

$\frac{a^{2}+6a+p^{2}-8p+13}{a-p}-2(a+3)$

Sub in [1], do the algebra and it whittles down to:

$\frac{25}{2(2a-1)}-a+\frac{1}{2}=0$

Solving for a we find $a=-2$

Which means $p=3$

So, the points are (-2,1) and (3,11)

and the line equation is $\boxed{y=2x+5}$