# Optimization problem, triangle

## Homework Statement

a line passes through the point (1,1/8) and intersects the positive x axis at the point A and the positive y axis at the point B. What is the shortest possible distance between A and B?

## Homework Equations

i came up with three slopes for this line
m1=-b/a m2=-1/8(a-1) m3=(1/8)-b
A(a,0) and B(0,b)

## The Attempt at a Solution

well i tried using these equations to solve for a in terms of b and then use that in the distance equation, but when i differentiated i ended up with a cubic function and i could solve
then i tried looking at the problem using similar triangles and the breaking up the distance between them into two parts, but then i got that b was 1/8 and a was 1 which doesnt make sense

Mark44
Mentor

## Homework Statement

a line passes through the point (1,1/8) and intersects the positive x axis at the point A and the positive y axis at the point B. What is the shortest possible distance between A and B?

## Homework Equations

i came up with three slopes for this line
m1=-b/a m2=-1/8(a-1) m3=(1/8)-b
A(a,0) and B(0,b)

## The Attempt at a Solution

well i tried using these equations to solve for a in terms of b and then use that in the distance equation, but when i differentiated i ended up with a cubic function and i could solve
then i tried looking at the problem using similar triangles and the breaking up the distance between them into two parts, but then i got that b was 1/8 and a was 1 which doesnt make sense
If the coordinates of A are (a, 0) and those of B are (0, b), the slope of the line is -b/a. Now find the equation of the line, which will give you a relationship between x and y.

Your problem is to minimize the distance between A and B, and the distance is sqrt(a2 + b2). Using the equation of the line, you can write the distance function in terms of one variable, and then use calculus to find the minimum distance.