Optimisation and optimal control : Tutorial solutions calculus of variations) Question i) Here we get x d ) = d ) = 0 Hence ṫ = ct 3 where c is an arbitrary constant. Integrating, xt) = at 4 + b where a and b are arbitrary constants. Substituting the boundary conditions gives a = b = and so xt) = t 4 +. ii) Here we get x d ) = 0 x sint) d ) = 0 or ẍ + x = sin t. General solution of homogenous equation is x g t) = A sin t + B cos t. To find particular integral try x pi = Ct cos t. Then C sin t Ct cos t + Ct cos t = sin t giving C =, or x pi = t cos t. Thus general solution of equation is xt) = x gt) + x pi t) = A sin t + B cos t t cos t. Substituting boundary conditions gives A = and B =, or xt) = sin t + cos t t cos t. iii) Here, x d ) = 0 sin t d ) = 0 Hence ẍ = sin t and hence xt) = sin t + At + B. Substituting boundary conditions gives A = B = 0, or xt) = sin t. t 3 Question In this case, Hence d fx, ) ) = x + ẍ ẍ d d fx, ) ) = x d )) = 0 since xt) satisfies the Euler-Lagrange equation. Thus fx, ) ) is constant. Question 3 i) Since f is independent of t, Euler-Lagrange equation is: Integrating f = c x 3 x 3 = c dx = cx3/ xt) = kt + l xt) = kt + l)
Substituting end-points: = /l and hence l = ±. Also 4 = /k+l) and hence k = ± 4 l. Thus we have the four possibilities for k, l): ±, ) and ± 3, ) which result in two possible 4 4 solutions: xt) = and xt) = 4 t) 3 4 t) The second of these is not admissible, since it tends to infinity at t = 3 which is inside interval 4 [0, ] and the two branches of the curve are not connected. Thus the only extremising solution is x t) = 4 t). ii) Again using the modified Euler-Lagrange equation we get x = c or = c + x. Integrating, dx = c + x Make substitution y = c + x. Then ydy = dx and hence ydy y = y = t + A Thus y = t + A) = c + x or xt) = t + αt + β. Substituting initial conditions gives α = β = 0, or xt) = t. Question 4 Here, F x,, t) = ft, x) + and hence the Euler-Lagrange equation is: F x d ) F = 0 + x d ) ft, x) = 0 + Hence Simplifying i.e. + x t + x + ẍ ft, x) + ) = 0 3/ + x ) ẍ ft, x) = 0 t + x ẍ ft, x) t + = 0 Question 5 The integrand does not depend explicitly on x and hence Euler-Lagrange equation is of the form: = C
where C is an arbitrary constant. Thus, t + = C C t ) = c x = Ct C t Integrating or xt) = Ct C t = C C t + C x C ) + t = C which is a circle in the x, t)-plane with centre on the x-axis. From the conditions x) = 0, x) = we find C = 5, C =, so that the final solution is x ) + t = 5. Question 6 i) In this case f is not an explicit function of t and hence Euler-Lagrange equation is x d ) = 0 = c where c is a constant. Thus, + t = c or t = c. Separating variables, dx = ct. Integrating, xt) = c + a where c and a are constants. Substituting the boundary condition t x) = 0 gives c + a = 0. Next, note that = ct and the tranversality condition in this case gives: ) = 0 + t t= = 0 + t ct ) t= = 0 Thus c = 0 which gives c = and a =. Thus the extremising solution is xt) = t. ii) In this case f is not an explicit function of t and hence Euler-Lagrange equation is x d ) = 0 x + e t d ) = 0 or ẍ x = e t. The general solution of the corresponding homogenous equation is xt) = Ae t +B t and the particular integral is xt) = tet. Thus the general solution of the differential equation is xt) = Ae t + Be t + tet. Substituting the boundary condition x0) = 0 gives A + B = 0. The transversality condition is: ) = 0 ) = 0 Aet Be t + et + tet = 0 t= or Ae Be = e and hence Ae B = e. Thus, A = e, B = e + xt) = e e + e t + e t ) + tet = tet e sinh t. cosh e e + and hence iii) Here f is not an explicit function of x and hence the Euler-Lagrange equation gives = b t 3 = b = bt3 xt) = bt 4 + a 3
where b and a are constants. Substituting the boundary condition x0) = gives a = and hence xt) = bt 4 +. The tranversality condition is: ft ) + ċt ) T )) T ) = 0 where ct) is the curve ct) = + t ). Now, ċ = t ) ċt ) = T ); = 4bt 3 T ) = 4bT 3 ; Also, ft) = t 3 ft ) = 6b T 6 T 3 = 6b T 3 = t T ) 3 = 4bT 3 T 3 = 8b Thus 6b T 3 + [T ) 4bT 3 ]8b = 0 bt 3 = T b = T T 3 Also note that at t = T : bt 4 + = + T ) T T 3 T 4 + = + T ) T = b = 8 Thus the optimum solution is xt) = 8 t4. Question 7 The Euler Lagrange equation for the augmented integral gives: x d 0 t) + λxt)) ) = 0 λ d ) = 0 or ẍ = λ λt. Hence = + c and xt) = λ 4 t + ct + d where c and d are constants. The boundary condition x0) = 0 gives d = 0. The boundary condition x) = gives λ + c =. Hence xt) = λ 4 t + λ t. Thus λ xt) = 4 t + λ ) t = λ 0 and hence xt) = t 3t 4. 0 [ ] t 3 + λ [ ] 0 t 4 = λ 0 3 = λ = 3 Question 8 We are looking for a curve xt) for which the integral J[x] = a xt) is maximised, subject a to conditions a x a) = xa) = 0, K[x] = + = l 4 a
Form the augmented functional J[x] + λk[x] = a a x + λ + ) and write the corresponding Euler-Lagrange equation: x d ) = 0 + λ d ) = 0 + Integrating: t + λ = C + Integrating once more, we obtain t C ) + x C ) = λ which represents a family of circles. The values of C, C and λ may be determined from the conditions x a) = xa) = 0 and K[x] = l. Question 9 i) From notes, can be expanded using Taylor series as: where V = = ɛv + ɛ V + Oɛ 3 ) ht) ) x + ḣ and V = ) h f x + hḣ f x + f ḣ Note also that using integration by parts and the terminal conditions h) = h) = 0, the first variation V can be alternatively written as V = ht) x d )) from which one derives the Euler-Lagrange equation). Now, f, t) = + t) a is independent of x and hence the first and second variations simplify to: and V = V = ht) d which proves part i). ) = ḣ f = ḣ = at + t) a tḣ ḣ = a + t) a ) at + t) a = aa ) 5 ḣ t + t) a
ii) Note that Thus if then Next note that = at + t)a = V = t + t) = a c a ht) d t + t) = a c a tc a = + t) a ct a Integrating at + t) a ) = 0 xt) = ln t + c t β + c = + t ct β = + t = t + ct β Substituting x) = 0 gives c = c and hence xt) = ln t+c t β ). Substituting x) = B gives B = ln + c β ). Thus c = B+ln β iii) Differentiating xt) gives, and hence x t) = ln t + B + ln β tβ ) = t + B + ln β βtβ t + = β B + ln β tβ Note that β = > so that a β > 0 and hence + t > 0 for t provided B + ln > 0. In addition a < 0 and hence Thus for all sufficiently small ɛ, V = aa ) ḣ t < 0 + t) a [x, h] = S[x + ɛh] S[x ] = ɛ V < 0 S[x ] S[x + ɛh] and hence x maximises S[x] locally). 6