



Store




CTK Exchange
CSpeed0001
Member since Feb1903

Jun2405, 09:24 AM (EST) 

"Calculus of Variations: Shape of a Hanging Cable"

Just for fun, I'm trying to figure out a function to describe the shape that a cable takes when suspended between two walls. I just recently learned about the Calculus of Variations, and wanted to practice it to see if I still knew it. I started out by minimizing the potential energy of the system. The formula for the potential energy (assuming that the cable doesn't stretch) is mgh. I decided that the xaxis is the line connecting the points where the cable is attached. The yaxis lies in the middle. With my axis set up this way, h=y. Now my potential energy expression becomes U=mgy. Then I called the linear density lambda, and decided that it was roughly constant. If I take a differential length of the cable (dl), I can use the pythagorean theorem to rewrite it as sqrt(dx^2+dy^2) or sqrt(1+(y')^2)dx. The mass of the differential length is lambda*dl or lambda*sqrt(1+(y')^2)dx. This makes my potential energy equation dU=g*lambda*y*sqrt(1+(y')^2)dx. I can integrate both sides to get the total potential energy. Calculus of variations tells me that if I have an integral that I want to minimize, and the integrand happens to be a function of a function (y) its derivative (y') and x, then the partial of the integrand wrt y equals the derivative wrt x of the partial of the integrand wrt y'. If I call the integrand 'f' and use the letter P as the partial symbol (that backwards six thing), then Pf/Py=(d/dx)(Pf/Py'). After doing all of these operations, and much simplification, I get y*y"=(y')^2+1. There is something wrong with this because if I separate it out into homogeneous and nonhomogeneous (not sure if I can do this with nonlinear ODEs), e^(mx) seems to work for any value of m. This is impossible because the shape of a cable starts and ends at zero, and is symmetric (y'(0)=0). The exponential function is only symmetric for complex values of m. Does this mean that m is complex? If so, then how do I rule out real solutions of m? Or have I made a mistake in my formulations somewhere? CS 

Alert  IP 
Printerfriendly page 
Reply 
Reply With Quote  Top 


alexb
Charter Member
1563 posts 
Jun2405, 10:53 AM (EST) 

1. "RE: Calculus of Variations: Shape of a Hanging Cable"
In response to message #0

Assuming the above is correct. >After doing all of these operations, and much >simplification, I get >y*y"=(y')^2+1. There is something wrong with this There might be, but not for the reasons you give. Your equation is nonlinear. >because >if I separate it out into homogeneous and nonhomogeneous >(not sure if I can do this with nonlinear ODEs), e^(mx) >seems to work for any value of m. You can't apply homogeneous/nonhomogeneous method to a nonlinear equation. What you have to do is, say, a substitution that utilizes the fact that x does not appear in y*y"=(y')^2+1 explicitly. You may first replace y'(x) with f(x): y·f' = f^{2} + 1. Next, think of f(x) as F(y) and replace d/dx with d/dy, but think how. In two steps you'll get a family of hyperbolic functions. (Each step is solving a first order differential equation.)


Alert  IP 
Printerfriendly page 
Reply 
Reply With Quote  Top 



CSpeed0001
Member since Feb1903

Jun2405, 12:32 PM (EST) 

2. "RE: Calculus of Variations: Shape of a Hanging Cable"
In response to message #1

Thanks for you quick response! Also thanks for not giving me the answer (cosh seems to work, but I got that by guessing). Half of the fun is working it out. I could use a little more guidance though. >Assuming the above is correct. I checked the math on the calculator, but my initial formulation might be wrong. >>if I separate it out into homogeneous and nonhomogeneous >>(not sure if I can do this with nonlinear ODEs), e^(mx) >>seems to work for any value of m. > >You can't apply homogeneous/nonhomogeneous method to a >nonlinear equation. I'm relieved by this. This means the work that lead to the differential equation still might be right. >Next, think of f(x) as F(y) and replace d/dx with d/dy, but >think how. I'm not real sure how to accomplish this. On the surface, it looks like I can 'multiply' everything by dx/dy and get there. This cleans up the LHS nicely, but boogers up the RHS pretty badly. I think that I'm missing something fairly obvious here. If I can get this step, I could probably figure the rest out on my own. BTW: Do hyperbolic functions count as one solution or two? 

Alert  IP 
Printerfriendly page 
Reply 
Reply With Quote  Top 




alexb
Charter Member
1563 posts 
Jun2405, 12:39 PM (EST) 

3. "RE: Calculus of Variations: Shape of a Hanging Cable"
In response to message #2

>I'm relieved by this. This means the work that lead to the >differential equation still might be right. Correct. >>Next, think of f(x) as F(y) and replace d/dx with d/dy, but >>think how. Just assume f(x) = F(y(x)) and differentiate wrt to x. By the Chain Rule df/dx = dF/dy·dy/dx, so that dF/dy = f'/f. >BTW: Do hyperbolic functions count as one solution or two? Each function, even if hyperbolic, is a solution, provided it'solves the equation.


Alert  IP 
Printerfriendly page 
Reply 
Reply With Quote  Top 




CSpeed0001
Member since Feb1903

Jun2705, 08:06 AM (EST) 

7. "RE: Calculus of Variations: Shape of a Hanging Cable"
In response to message #3

>Just assume f(x) = F(y(x)) and differentiate wrt to x. By >the Chain Rule > >df/dx = dF/dy·dy/dx, > >so that > >dF/dy = f'/f. Thanks, this is exactly what I was asking for. I knew that we were talking about reduction of order, but I wasn't sure how to implement it. >>BTW: Do hyperbolic functions count as one solution or two? > >Each function, even if hyperbolic, is a solution, provided >it'solves the equation. I was asking because I can rewrite hyperbolic functions as the sum of two exponential functions (i.e. cosh(x)=1/2(e^{x}+e^{x})). I was wondering if this made it two solutions instead of one. :) CS 

Alert  IP 
Printerfriendly page 
Reply 
Reply With Quote  Top 






mr_homm
Member since May2205

Jun2605, 06:30 PM (EST) 

5. "RE: Calculus of Variations: Shape of a Hanging Cable"
In response to message #2

The other responders have already discussed the method of solving the differential equation. I would like to add that there is an approach you can take to validating the equation itself before you proceed with the work of solving it. It would after all be a large waste of effort to solve the equation if that equation is not the correct one. The idea is simple, and I apologize if I am telling you something you already know. You look for physical symmetries in the original problem and test if the equation obeys those symmetries; you also look for special physical cases where the answer is obvious, and again test whether those answers satisfy your differential equation. (This is something physicists do all the time in formulating equations governing the behavior of physical systems. Of course, if you have a purely nonphysical mathematical problem, this method is not applicable, but in the present case, you might as well use it.) For example, the original physical situation is symmetrical, and you have placed the y axis at the axis of symmetry. Therefore, your equation should show that if y(x) is a solution, then y(x) is also a solution. Your equation passes this test, because changing x to x reverses the signs of the odd numbered derivatives, but not the even ones, and since y' is squared, the sign reversal is removed. In other words, the physical situation is invariant under the operation of mirroring the x axis, and so is your equation. However, y*y"=(y')^2+1 runs into trouble if you set y=0 because the right side is of course at least 1. This means that your curve can never pass through y=0, i.e. you cannot put your x axis through the points where the cable is supported. Since (y')^2+1 > 0, this means that for curves with y>0, y" must also be >0, so we have a family of curves that are convex upwards. Similarly, there is a family of curves with y<0 that are convex downwards. Of course, we want the convex upwards family here, for physically obvious reasons. Now this doesn't mean necessarily that your equation is wrong, only that it is necessary to put your x axis below the lowest point of the curve. What is puzzling is WHY this restriction happens. Here is my interpretation: In the calculus of variations, you try to minimize your energy function U, which means that you require delta U = 0 for all variations of the curve y(x) with fixed endpoints. However, and this is the trouble, your problem can't consider ALL variations of y(x), because many of these would change the length of the cable. You need to consider only variations that leave the length L fixed. However, this is not included in your formulation anywhere. Also, it is not easy to incorporate this kind of constraint in the calculus of variations. You have to somehow reformulate the problem so that L is constant. At the moment, I admit that I can't remember how to do this. I will have to go look it up. In fact, without a restriction on L, the physically obvious solution is to let the cable droop infinitely far below the points of support, since that will lower the potential energy. There is no true minimum in this case. There is a way around this trouble, though. If you place your x axis below the lowest point of the cable, you can say definitely that the points of support have positive y values, and the solution must be in the convex upward family of curves, which all stay above y=0. Now it is true that there must be a minimum energy curve for any two fixed points of suspension, because since all the potential energies are now positive, too long a chain will have a high energy (more mass), while too short a chain will also have a high energy (more height). There is an easy proof of the latter fact: Start with the shortest possible chain, a straight line between the points of support, then displace the center point down a distance dy. This will make only a second order increase in L, but a first order decrease in the mean height, hence it will lower U. Therefore, you now have for two fixed support points, an absolute minimum of energy for some curve y_min(x). But if this is the absolute minimum energy, it is also necessarily the minimum energy among all curves that are the same length as y_min(x), so the restriction to constant L is unnecessary. Now this method will find the minimum energy curve between two fixed points, but there is no room any more for varying L. You get one unique answer, and the value of L comes along with it. But it is physically obvious that you can hang any length of chain from two points, not just the unique length specified here, so there is still a difficulty. The solution is to notice that when y(x) solves the equation, y+a does NOT, which means that if you displace your points of support upwards a distance "a" then the solution curve does not simply follow them, but changes shape and hence (I expect, haven't checked) length. Therefore by varying the height of the suspension points, you can choose the length of chain hanging from them. By the way, here is a nonvariational way to derive the differential equation. Fron Newton's second law, the horizontal component Tx of the tension in the cable must be constant (otherwise, sections of the cable would have a net horizontal force and would accelerate in the x direction  obviously, they do not). Since the tension vector is tangent to the cable at each point, the vertical tension component is Ty2 = (dy/dx)*Tx at the right end and Ty1 = (dy/dx)*Tx at the left end. Balancing the weight and vertical support forces gives mg = Ty2+ty1, so that integral(lambda*g*sqrt(1+y'^2)dx) = Tx*(dy/dx2  dy/dx1) = Tx*integral(y"dx). Since this is true for any section of the curve, the integrands must be equal, hence 1+y'^2=c*y"^2, where c=(Tx/(lambda*g))^2. This is not the same equation derived from variations, but surprisingly, it has the same solutions. (The solution given by mpdlc in response 4 has an error. It'should be y = k*Ch(x/k)+c).) This new equation is really first order, since you can replace z=y' to get 1+z^2 = c*z'^2, which has z=k*Sh(x/k) as solutions, and integrating z gives y = k*Ch(x/k)+c. Another way to look at why the two equations have the same solutions is to make the assumption (as mpdlc did) that the origin is placed so that the constant c=0. In that case, the solution is y=k*Ch(x/k), which happens to have the property that y"=y. Hence replacing y with y" converts the variational equation into the Newtonian one, and allows the same solution to work for both equations. I hope this has been helpful, rather than merely confusing. There are really a lot of subtleties involved in formulating this kind of analysis properly, as I think you will agree. Stuart Anderson 

Alert  IP 
Printerfriendly page 
Reply 
Reply With Quote  Top 




CSpeed0001
Member since Feb1903

Jun2705, 07:49 AM (EST) 

6. "RE: Calculus of Variations: Shape of a Hanging Cable"
In response to message #5

>The other responders have already discussed the method of >solving the differential equation. I would like to add that >there is an approach you can take to validating the equation >itself before you proceed with the work of solving it. It >would after all be a large waste of effort to solve the >equation if that equation is not the correct one. Agreed, but the work is most of the fun. I have figured out through intuition that the 'shape' equation (the ODE that we've been discussing) probably has flaws. I'm a little bothered by the fact that it doesn't depend on the geometry of the cable in any way. My length canceled out, the distance between the two points canceled out, and my linear density canceled out. I was kind of hoping that the BCs would take care of some of that, but I'm not real hopeful about that. However, the right differential equation will probably require similar techniques to solve, and will probably have the same general shape. >However, y*y"=(y')^2+1 runs into trouble if you set y=0 >because the right side is of course at least 1. This means >that your curve can never pass through y=0, i.e. you cannot >put your x axis through the points where the cable is >supported. Since (y')^2+1 > 0, this means that for curves >with y>0, y" must also be >0, so we have a family of curves >that are convex upwards. Similarly, there is a family of >curves with y<0 that are convex downwards. Of course, we >want the convex upwards family here, for physically obvious >reasons. This is a very interesting point. The shape equation can't satisfy the only two real BCs that I have. I hadn't realized that. >In fact, without a restriction on L, the physically obvious >solution is to let the cable droop infinitely far below the >points of support, since that will lower the potential >energy. This is another very good point. I had figured that the changes in cable length were small and were therefore negligable. Though the changes in length are small, they have a big impact on the energy of the system. I think that including the elasticity (and thus the strain energy) of the cable (chain, string) would probably make the problem a little more physically accurate. >By the way, here is a nonvariational way to derive the >differential equation. I'm trying to avoid Newtonian physics. I learned calculus of variations last spring, and I'm trying to keep it fresh in my brain. >I hope this has been helpful, rather than merely confusing. >There are really a lot of subtleties involved in formulating >this kind of analysis properly, as I think you will agree. > >Stuart Anderson Thank you very much for your input. There are some pieces to this problem that I will surely incorporate. I'll post again if I figure anything out. BTW: What is 'Ch()'? CS 

Alert  IP 
Printerfriendly page 
Reply 
Reply With Quote  Top 



mpdlc
guest

Jun2505, 09:20 PM (EST) 

4. "RE: Calculus of Variations: Shape of a Hanging Cable"
In response to message #0

The differential equation y * y" = 1+(y')^2 you got is correct. One way of solved it, as it was suggested by the responder, is by using old trick of doing y"=dy'/dx =dy'/dy * dy/dx; what means y" = y'*dy'/dy. Now input y" in you equation you should get : y'dy'/(1+ y'^2) = dy/y ; what means Ln^(1/2) = Ln; K its the integation constant, what at the end is the more cumbersome to find. For the time being if we assume that y'=0 for y=K. What means take the ordinate axis as a symmetry axis. so we have y/K = (1+ y'^2) ..or.. y'^2 = (y/K)^2 1 ..or.. y'= <(y/K)^2 1>^(1/2) then dy'/<(y/K)^2 1>^(1/2)= dx ; so x = ArCh(y/K)+ C, C is the new constant we can made C=0 by taking the origin for x at the lower point of the cathenary where y'=0 ; x=0 and C=0. what means y= K Ch(x), As you can see it is simple the trouble come when given the distance betwen the walls the suspension points a different height and the lenght of the cable they ask for the equation. The calculation of the constant is the real numerical problem since you must solve transcental equation a big deal in the my old times when only help we have was the sliding rule. 

Alert  IP 
Printerfriendly page 
Reply 
Reply With Quote  Top 


You may be curious to have a look at the old CTK Exchange archive. Please do not post there.
Front page
Contents
Copyright © 19962018 Alexander Bogomolny

