# Find the point on a curve that is closest to the point (1,1), unsure how to continue

1. Jan 11, 2010

### Knight226

1. The problem statement, all variables and given/known data
Find the point on the curve y = cos (x) closest to the point (1,1)

2. Relevant equations
Tangent line equation
y = f'(c)(x-c)+f(c)

Distance formula
d = SQRT( (x1-x2)^2 + (y1-y2)^2 )

3. The attempt at a solution
I have problem doing the f'(c) part. I get stuck when I have trigonometry in the equation where I have to set it to zero to find the critical number...

So far I have
d = SQRT( (x-1)^2 + (y-1)^2 )
y = cos (x)
d = SQRT( (x-1)^2 + (cos(x)-1)^2 )
*Here according to my textbook, what matter is what is inside radical sign*
f(x) = (x-1)^2 + (cos(x)-1)^2
f(x) = x^2-2x+2+cos^2x-2cosx

f'(x) = 2x - 2 - sin2x + 2sinx

Set f'(x) to zero
2x - 2 - sin2x + 2sinx = 0

Get stuck here :(
let say I do...
-sin2x + 2sinx = -2x + 2
then.. I don't know what to do next... I am horrible with trigonometry... Please help. Thank you very much in advance. Please let me know if I have made mistakes somewhere along the calculation.

2. Jan 11, 2010

### Matterwave

Re: Find the point on a curve that is closest to the point (1,1), unsure how to conti

The derivative of cos^2(x) is not -sin(2x), it's -2cos(x)sin(x) by the chain rule.

3. Jan 20, 2010

### Knight226

Re: Find the point on a curve that is closest to the point (1,1), unsure how to conti

Understood. Thank you! :D

4. Jan 21, 2010

### Staff: Mentor

Re: Find the point on a curve that is closest to the point (1,1), unsure how to conti

It's simpler if you work with the square of the distance, and minimize it. After all, if the square of the distance is minimized, then the distance will also be minimized.

D2(x) = (x - 1)2 + (cos(x) - 1)2
d/dx[D2(x)] = 2(x - 1) + 2(cos(x) - 1)*(-sin(x))

Now set this derivative to 0 and find the critical points.

5. Jan 21, 2010

### Char. Limit

Re: Find the point on a curve that is closest to the point (1,1), unsure how to conti

Isn't 2cos(x)sin(x) equal to sin(2x) by some trig identity?

So I don't see what Matterwave finds false...

6. Jan 21, 2010

### Staff: Mentor

Re: Find the point on a curve that is closest to the point (1,1), unsure how to conti

Nor do I. The identity you cited is the double angle formula for sin.

7. Jan 21, 2010

### Char. Limit

Re: Find the point on a curve that is closest to the point (1,1), unsure how to conti

Ok, I have a tendency to assume that if two people's facts differ, and I'm one of the people, the fault lies in my facts. Thanks for clearing that up.