## Trending News

# calculus hwk help?

Use the first derivative test to show that the shortest distance from a point (P,Q) to the line ax+by+c=0 is

d= l aP+bQ+c l/ sqrt(a^2+b^2)

(assuming (P, Q) is not on the line)

I dont even know where to start...

I have asked this question before but i still dont understand it ( I thought i did but once I started working on it i didnt get it) Please explain how its done...

### 1 Answer

- Anonymous1 decade agoFavorite Answer
Let s be the distance of the point (h,k) from a point (x,y) on the line ax + by + c = 0.

The equation of the line may be rewritten:

y = - (c + ax) / b ...(1)

Then:

s^2 = (h - x)^2 + (k - y)^2 ...(2)

(d/dx)(s^2)

= - 2(h - x) - 2(k - y)(dy / dx)

= - 2[(h - x) + (k - y)(- a / b)]

(d^2/dx^2)(s^2)

= 2 + (2a / b)(- dy / dx)

= 2 + (2a / b)(a / b)

= 2(a^2 + b^2) / b^2

As (d^2/dx^2)(s^2) is clearly positive, s is a minimum when:

(d/dx)(s^2) = 0

- b^2(h - x) + a(kb + c + ax) = 0

(a^2 + b^2)x = b^2h - akb - ac

x = (b^2h - abk - ac) / (a^2 + b^2)

Substituting this value of x in (1):

y = - (a(b^2h - akb - ac) + c(a^2 + b^2)) / b(a^2 + b^2)

y = (a^2k - abh - bc) / (a^2 + b^2)

Substituting for x and y in (2):

s^2 = [ ( b^2h - ac - bak ) - h(a^2 + b^2) ] + (a^2k - abh - bc - k(a^2 + b^2) ] / (a^2 + b^2)^2

= [ (- ac - abk - ha^2)^2 + (- abh - bc - kb^2)^2 ] / (a^2 + b^2)^2

= ( a^2c^2 + a^2b^2k^2 + h^2a^4 + 2a^2bck + 2a^3bhk + 2ha^2c

+ a^2b^2h^2 + b^2c^2 + k^2b^4 + 2ab^2ch + 2kcb^3 + 2ab^3hk )

/ (a^2 + b^2)^2

= (a^2 + b^2)(a^2h^2 + b^2k^2 + c^2 + 2ach + 2bck + 2abhk ) / (a^2 + b^2)^2

= (ah + bk + c)^2 / (a^2 + b^2)

s = | ah + bk + c | / sqrt(a^2 + b^2).