# Calculating the envelope of a sliding line

Gold Member

## Main Question or Discussion Point

I read this question a few days ago:
Lets say that you have a line that goes from a point on the +y axis to a point on the +x axis with the length of L. There's an infinate amount of such lines, starting with a line that goes from (0,0) to (0,L) and ending with one that goes form (0,0) to (L,0). Now the question is, what function describes the envelope of all of those lines?
I got:
y(x) = sqrt(L^2 - (L^2 * x)^2/3)x / (L^2 * x)^1/3 + sqrt(L^2 - (L^2 * x)^2/3)
Can anyone verify that?
Thanks.
EDIT: i changed the equation a little

Last edited:

what do you mean by "envelope" of lines?

@murshid_islam:
I think he means the following:
Imagine the positive x- and y-axis and a line of length L. Now you
let the line (or the bar) "slide" with the condition that one end of the line touches the y-axis and the other end the x-axis.

I get

$$f(x) = \left( 1- \frac{L}{\sqrt{Lx}} \right) \cdot x + L - \sqrt{Lx}$$

$$= \left( \sqrt{x}-\sqrt{L} \right)^2$$

Last edited:
Gold Member
Edgaro: yes thats what i meant.
(notice that i've changed the equation a little)
How did you derive that?
For my answer a first made a function that described a line based on a point on the x axis (i called it a) so i got a function f(x,a) where 'a' is the point on the x axis that the line goes through and x is the height of the line on at position x on the x-axis. i got:
f(x,a) = sqrt(L^2 - a^2)(x/-a + 1)

then i took the partial derivative with respect to 'a' to find what 'a' gives the maximum value for a certain 'x'. i got:
df(x,a)/da = x[1/c - c/a^2] - a/c
were c = sqrt(L^2 - a^2)
equating that to 0 gave me:
a = (L^2 * x)^1/3.
inserting that into f(x,a) gave me my answer.
where did i go wrong?
Thanks.

uart
where did i go wrong?
In the algebra I guess, your technique looks sound enough but your final answer definitely looks wrong.

BTW is that square-root meant to be added onto the end of your equation (as written) or is it meant to be part of the denominator. It would be a lot easier to read if you used latex for other than very simple equations.

I cheated and did the simplified case of L=1 and got the solution,

$$y(x) = (1-x^{2/3})^{3/2}$$

I haven't verified this but I'm pretty sure the general case will be,

$$y(x) = (L^{2/3}-x^{2/3})^{3/2}$$

Last edited:
Hello Daniel,

I made a mistake, sorry. Instead of using the condition L^2=n^2+a^2 I used L=n+a. I calculated again and got the same result for a as you.

So here's the full solution (which I hope is correct this time):

1) Which equation describes the lines as a function of a?
(a is the value for which the line touches the x-axis)

Equation for a line:
$$y=m \cdot x +n$$

Which condition does the line fulfill?
$$L^2=n^2+a^2$$
=> $$n = \sqrt{L^2-n^2}$$
(n>0)

m as a function of a:
$$m= \frac{\Delta y}{\Delta x}= \frac{n}{-a}= - \frac{\sqrt{L^2-a^2}}{a}$$

n as a function of a:
$$n = \sqrt{L^2-a^2}$$

Inserting m and n into y yields:
$$y = - \left( \frac{\sqrt{L^2-a^2}}{a} \right) \cdot x + \sqrt{L^2-a^2}$$
$$= \sqrt{L^2-a^2} \left( - \frac{1}{a} \cdot x + 1 \right)$$

Lets call the functions f(x,a)=y:
$$f(x,a)= \sqrt{L^2-a^2} \left( - \frac{1}{a} \cdot x + 1 \right)$$

f(x,a) describes the lines.

2) Which equation describes the envelope?

$$g(x) = \max_{a \in (0,L)} {f(x,a)}$$

(Note: I excluded a=0 and a=L since for these values we know that
g(0)=L and g(L)=0 and to avoid division by zero in the calculations.)

Determine a such that f(x,a) is maximized:
Deriving f(a,x) with respect to a, setting derivative of f(a,x) equal to zero
and solve for a yields:

$$a= (L^2 x)^{1/3}$$
(a>0)

3) Plug the value for a into f(x,a) yields:

$$g(x) = \sqrt{L^2-(L^2 x)^{2/3}} \left( 1- \frac{x}{(L^2 x)^{1/3}} \right)$$

Last edited:
Note:

$$g(x) = \sqrt{L^2-(L^2 x)^{2/3}} \left( 1- \frac{x^{2/3}}{L^{2/3}} \right)$$

allows plugging in x=0.

uart
Note:

$$g(x) = \sqrt{L^2-(L^2 x)^{2/3}} \left( 1- \frac{x^{2/3}}{L^{2/3}} \right)$$
Which if you simplify gives gives

$$g(x) = L \sqrt{1- \left( \frac{x}{L} \right)^{2/3}} \, \left(1- (\frac{x}{L})^{2/3} \right)$$

$$g(x) = L \left( 1 - \left(\frac{x}{L} \right)^{2/3} \right)^{3/2}$$

$$g(x) = (L^{2/3} - x^{2/3})^{3/2}$$

Exactly as I stated several days ago.

Last edited:
uart
Hello Daniel,

I made a mistake, sorry. Instead of using the condition L^2=n^2+a^2 I used L=n+a. I calculated again and got the same result for a as you.
...
$$g(x) = \sqrt{L^2-(L^2 x)^{2/3}} \left( 1- \frac{x^{2/3}}{L^{2/3}} \right)$$
Well considering that the solution that daniel_i_l proposed was,
I got:
y(x) = sqrt(L^2 - (L^2 * x)^2/3)x / (L^2 * x)^1/3 + sqrt(L^2 - (L^2 * x)^2/3)
Which as best as I can make out means,

$$y(x) = \frac {x \sqrt{L^2 - (L^2 x)^{2/3}}} {(L^2 x)^{1/3}} + \sqrt{L^2 - (L^2 x)^{2/3}}$$

Edgardo, just how do you justify that they are the same?

EDIT Ok I see now, you're only claiming that you got the same value for a as Daniel, not the same final result. Like I said before, he seemed to be doing everything correctly but obviously made a mistake somewhere in the algebra.

Last edited: