ECE 68 Midterm Exam Solution April 1, 8 1 Calculus of Variations This exam is open book and open notes You may consult additional references You may even discuss the problems (with anyone), but you must prepare and turn in your own solutions, and give credit where credit is due as explained in the course information sheet on the course website If you consult additional references, please use the notation used in our textbook when you write your solution, to show that you ve understood as opposed to just reproduced the method Please apply the methods from the Calculus of Variations section to solve the following problems (and justify your answers) Justification includes stating all assumptions that you make in applying the methods, and showing all of the steps involved Let p 1, p and p 3 be the first three nonzero digits of your university ID number Please do not write your entire ID number on your solution 1 Fairly routine problems: (a) Find the extremal of J 1 = subject to x(1) = and x(p 1 ) = 3 1 ẋ t 3 dt (b) Find the extremal of J 1 subject to x(1) = and x(t 1 ) lies on the curve x(t) = t p (c) Find the curve x(t) on the interval t [, p 1 ] that minimizes J = (ẋ 1) x dt subject to x(p 1 ) = p 3 (d) Find the curve x(t) on the interval t [, ] that minimizes J x() = p subject to An isoperimetric problem: Find the curve x(t) of length π on the interval t [, p 3 ] such that J = xdt is maximized (You ll need to characterize the constraint on the length of the curve and use Lagrange multipliers and find the appropriate necessary condition for the curve to satisfy)
ECE 68 Midterm Exam Solution April 1, 8 Problem 1 (a) Solution Find the extremal of subject to x(1) = and x(p 1 ) = 3 Solution: Our cost is of the form J 1 = 1 ẋ t 3 dt J 1 = t1 t F (t, x, ẋ)dt with fixed endpoints x(t ) = x and x(t 1 ) = x 1, so we apply the Euler-Lagrange equation F x d dt F ẋ = The partial derivative of F (t, x, ẋ) with respect to x is zero The partial derivative of F (t, x, ẋ) with respect to ẋ is Fẋ = ẋt 3 Thus the Euler-Lagrange equation gives or, for some constant c, that d dt F ẋ = 3ẋt =, ẋt 3 = c Applying the technique of separation of variables we obtain the differential equation ẋ = c t 3 or dx = c t 3 dt Integrating both sides of this last equation from t = 1 to t = p 1 we obtain thus Solving for c in terms of p 1 yields x(p 1 ) x(1) = c ( 1 p 1 ( ) 1 p 3 = c 1 c = ( 6p 1 1 p 1 ) p 1 1 1 ) = 6p 1 p 1 1
ECE 68 Midterm Exam Solution April 1, 8 3 The extremal of the cost function is then obtained by evaluating the indeterminate integral x(t) x dy = t t c s 3 ds Performing this integration we obtain x(t) = c ( ) 1 t t where c is given in terms of the value p 1 above, or equivalently ( ) ( ) 3p x(t) = 1 1 t p 1 1 t Problem 1 (b) Solution Find the extremal of J 1 = subject to x(1) = and x(t 1 ) lies on the curve Solution: As in part (a) we have 1 ẋ t 3 dt, g(t) = t p F = ẋ t 3, (1) F x = and () Fẋ = ẋt 3 (3) We are using the same cost as in part (a), but now only one of the endpoints is fixed and the other is constrained to lie on the curve g(t) = t p The extremum must still satisfy the Euler-Lagrange equation, so we obtain the same function x(t) = c(t 1) as in part (a) Since we don t have a fixed right endpoint; however, we cannot use simple integration to find the value of c as we did c in part (a) Instead, we apply the transversality constraint (F + (ġ ẋ)fẋ) t=t1 = (4) Since ẋ(t) = ct 3 and ġ(t) = 4t 3,
ECE 68 Midterm Exam Solution April 1, 8 4 we simplify (4) to obtain Thus c {, 4} = ẋ t 3 t=t1 + t 3 ( c )ẋt 3 t=t1 (5) = t 3 1( ct 3 1 ) + 4( c )( ct 3 1 ) (6) = 4t 3 1 c( c + 4) (7) If c were zero we would have x(t) = t [1, t 1 ] This can be true only if zero lies on the curve defined by g(t) That would require g(t 1 ) = t 1 p =, in which case t 1 = p If, on the other hand, c = 4, then Solving for t 1 we obtain x(t) = 4(t 1) x(t 1 ) = 4(t 1 1) = t 3 1 p = g(t 1 ), t 1 = 4 p Of course this solution works only if p {1,, 3} so those whose p value was not in that set had to choose the option x(t) = t and t 1 = p Problem 1 (c) Solution Find the curve x(t) on the interval t [, p 1 ] that minimizes subject to x(p 1 ) = p 3 J = (ẋ 1) x dt Solution: In this problem, we have one fixed end, x(p 1 ) = p 3 and one free end at t = This is the opposite case from that done in the textbook However, if we repeat the derivation applied in the textbook for this case, we find that the conditions on the extremal are 1 the Euler-Lagrange Equation F x d dt F ẋ =, the transversality condition (F ẋfẋ) t=t =, and
ECE 68 Midterm Exam Solution April 1, 8 5 3 the transversality condition Fẋ t=t = These look very similar to the transversality conditions obtained when the fixed point is at the other end All that s changed is where we evaluate the expresssions Now we must compute F, F x and Fẋ We have the following: Applying the Euler-Lagrange equation we have Applying the chain rule yields which simplifies to F = (ẋ 1) x, (8) F x = x(ẋ 1), and (9) Fẋ = (ẋ 1)x (1) x(ẋ 1) d dt ((ẋ 1)x ) = x(ẋ 1) d dx ((ẋ 1)x ) dx dt d dẋ ((ẋ 1)x ) dẋ dt =, x(ẋ ẋ + 1) 4x(ẋ 1)ẋ x ẍ = Obviously x(t) = t [, p 1 ] is a solution of this differential equation, but since x(p 1 ) = p 3, this solution does not satisfy the conditions on the function x(t) Factoring out x and simplifying we obtain ẋ 1 + xẍ = This can be solved by separation of variables Since we obtain by integrating, Let c = (xẋ)() Then we can integrate ẋ + xẍ = d dt (xẋ), t = (xẋ)(t) (xẋ)() (t c)dt = xdx to obtain This gives us one equation (s / cs) s=t = s= x (t) x () x (t) x () = t(t c) (11)
ECE 68 Midterm Exam Solution April 1, 8 6 in two unknowns x() and c Luckily we have the transversality conditions to work with Starting with the second one we have Fẋ t= = (ẋ() 1)x () =, which requires either x() = or ẋ() = 1 If x() = then (11) becomes x (t) = ( c) = (1) We already showed that this did not hold, so ẋ() = 1 Then c = x() We can solve for the value of x () by examining the right endpoint where x(p 1 ) = p 3 We have that x () = p 3 p 1(p 1 + x()), (13) which is quadratic in x() Solving yields that x() = p 1± 4p 3 p 1 Thus we need p 1 < p 3 Providing this holds, we then have with x() as above t(t + x()) x(t) = + x () (14) Problem 1 (d) Solution Find the curve x(t) on the interval t [, ] that minimizes J subject to x() = p Solution: Due to a typographical error, this is actually the same problem as 1(d) with different terminal condition Figuring that the exam had turned out to be quite long enough as it was, I chose not to fix the typo Substituting for p 1 and p for p 3 in the solution to 1(c) yields t(t + x()) x(t) = + x () (15) where x() = 1 ± (p 1) We see that we need p > 1 Problem (Isoperimetric Problem) Solution An isoperimetric problem: Find the curve x(t) of length π on the interval t [, p 3 ] such that J = xdt
ECE 68 Midterm Exam Solution April 1, 8 7 is maximized Solution: The length of the curve is γ = 1 + ẋ dt (16) Applying the method of Lagrange multipliers, we seek an extremal of so J = x + λ 1 + ẋ dt (17) F = x + λ 1 + ẋ, (18) F x = 1, and (19) Fẋ = 1 λẋ 1 + ẋ () The Euler Lagrange Equation is then 1 d λẋ dt 1 + ẋ (1) so or λẋ(t) 1 + ẋ (t) 1 λẋ() = t () + ẋ () λẋ(t) 1 + ẋ (t) = t + c (3) Then resolving the square root we obtain λ ẋ = (t + c) (1 + ẋ ) (4) Solving for ẋ we obtain Integrating both sides of yields ẋ = dx = x(t) x() = (t + c) λ (t + c) (5) (t + c) dt (6) λ (t + c) λ (t + c) (7)
ECE 68 Midterm Exam Solution April 1, 8 8 or (x(t) + d) = λ (t + c) Thus, the solution is a circular arc of length π and radius λ centered at (t, x) = ( c, d) where c and d are given in terms of the initial values x() and ẋ() Thus we have two unknowns that would have to be specified in order to determine the center of the circle Now to find the value of λ, we note that 1 + ẋ (t)dt = = = +c c = sin 1 p 3 + c λ λ (t + c) + (t + c) λ (t + c) dt (8) λ dt (9) λ (t + c) λ λ ( t) d t (3) sin 1 c λ = π (31) This is satisfied if we take p 3 + c = c or c = p 3 / and λ = ±c = p 3 /