Finding $y(x)$ using a minimization problem.

143 Views Asked by At

I am going to post a problem that I've tried to solve and I feel like I've been banging my head against the wall. Any kind of hint or advice are more than welcome.

The Problem:

Consider a 3 meter power cable, attached between two poles to a distance of $2$ meters. Find $y(x)$,a function that measures the height of the cable at each x position between $0$ and $2$. For that, consider:

$$\begin{array}{ll} \text{minimize} & \displaystyle\int_{0}^2 y(x)\sqrt{1 + y'(x)^2} dx\\ \text{subject to} & \displaystyle\int_0^2 \sqrt{1 + y'(x)^2} dx = 3\\ & y(0) = 0, \quad y(2) = 0\end{array}$$

The objective function represents the potential energy to be minimized and the constraint is the force in wich the power cable lenght is fixed. For that use the appropriate discretization of the problem and use the resolution of the KKT method through Newton method for non-linear systems. Your solution must consider a globalization strategy for the Newton method.

What I've tried:

I've tried a different approach, using the exterior penalty method, with the sub-problems solved by the newton method. what I've got was that

$$y(x) = a \cosh(x +a)$$

but this is wrong, I know that the exact solution of the problem is

$$y(x) = a \cosh \left( \frac{x + b}{a} \right) + c$$

It's worth reminding that $a, b, c$ are just constants.

1

There are 1 best solutions below

2
On BEST ANSWER

With the help of Lagrange multiplier $\lambda$ the minimization problem can be posed as

Determine the stationary points for $(y,\lambda)$ in

$$ \int_0^2 y\sqrt{1+y' ^2} dx + \lambda \left(\int_0^2\sqrt{1+y'^2}dx -3\right) $$

Now considering

$$ L = y\sqrt{1+y' ^2}+\lambda\left(\sqrt{1+y'^2}-\frac 32\right) $$

the variation gives us the Euler-Lagrange conditions

$$ \cases{ y''(y+\lambda)-y'^2-1=0\\ \int_0^2\sqrt{1+y'^2}dx -3 = 0 } $$

This ODE has as primitive function

$$ y(x,c_1,c_2,\lambda) = \frac{1}{2} \left(e^{-e^{c_1}(c_2+ x)-2 c_1}+e^{e^{c_1}(c_2 + x)}-2 \lambda \right) $$

From this point, the problem is solved numerically by a minimization process:

calling $r_1(c_1,c_2,\lambda) = y(0)$ and $r_2(c_1,c_2,\lambda) = y(2)$ we need to solve

$$ \min_{c_1,c_2,\lambda}\left(r_1^2+r_2^2+\left(\int_0^2\sqrt{1+y'^2}dx -3\right)^2\right) $$

Follows a MATHEMATICA V 11 script which accomplishes that.

Clear[lambda, c1, c2, y, x]
L = y[x] Sqrt[1 + y'[x]^2] + lambda (Sqrt[1 + y'[x]^2] - 3/2)
eq1 = D[L, y[x]] - D[D[L, y'[x]], x] // FullSimplify // Numerator
soly = DSolve[eq1 == 0, y, x][[1]] /. {C[1] -> c1, C[2] -> c2}
yx = y[x] /. soly;
r1 = yx /. {x -> 0}
r2 = yx /. {x -> 2}
int = Integrate[Evaluate[Sqrt[1 + y'[x]^2] /. soly], {x, 0, 2}]
solc1c2 = NMinimize[{r1^2 + r2^2 + (int - 3)^2, lambda > 1}, {c1, c2, lambda}]
yx0 = y[x] /. soly /. solc1c2[[2]]
Plot[yx0, {x, 0, 2}]