18.311 — MIT (Spring 2015) Rodolfo R. Rosales (MIT, Math. Dept., E17-410, Cambridge, MA 02139). February 26, 2015. Answers to Problem Set # 02. Contents 1 Problem ExID21. Check a pde implicit solution 1.1 ExID21 statement: Check a pde implicit solution . . . . . . . . . . . . . . . . . . . 1.2 ExID21 answer: Check a pde implicit solution . . . . . . . . . . . . . . . . . . . . . 2 2 2 2 Problem ExID51. Directional derivatives 2.1 ExID51 statement: Directional derivatives . . . . . . . . . . . . . . . . . . . . . . . 2.2 ExID51 answer: Directional derivatives . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 3 3 Problem ExID61. Implicit Taylor Expansions 3.1 ExID61 statement: Implicit Taylor Expansions . . . . . . . . . . . . . . . . . . . . . 3.2 ExID61 answer: Implicit Taylor Expansions . . . . . . . . . . . . . . . . . . . . . . 3 3 3 4 Problem ExID73. Change of variables for a pde 4.1 ExID73 statement: Change of variables for a pde . . . . . . . . . . . . . . . . . . . 4.2 ExID73 answer: Change of variables for a pde . . . . . . . . . . . . . . . . . . . . . 4 4 4 5 ExPD03. Solve the one directional wave equation 5.1 ExPD03 statement: Solve the one directional wave equation . . . . . . . . . . . . . 5.2 ExPD03 answer: Solve the one directional wave equation . . . . . . . . . . . . . . . 4 4 4 6 TFPa02. Near constant initial data (linearize) 6.1 Statement: TFPa02. Near constant initial data (linearize) . . . . . . . . . . . . . . 6.2 Answer: TFPa02. Near constant initial data (linearize) . . . . . . . . . . . . . . . . 5 5 5 7 TFPa06. Solve a first order linear pde 7.1 Statement: TFPa06. Solve a first order linear pde . . . . . . . . . . . . . . . . . . . 7.2 Answer: TFPa06. Solve a first order linear pde . . . . . . . . . . . . . . . . . . . . 6 6 6 8 TFPa07. Solve a first order linear pde 8.1 Statement: TFPa07. Solve a first order linear pde . . . . . . . . . . . . . . . . . . . 8.2 Answer: TFPa07. Solve a first order linear pde . . . . . . . . . . . . . . . . . . . . 7 7 7 1 18.311 MIT, (Rosales) 1 Check a pde implicit solution. ExID21. 2 Problem ExID21. Check a pde implicit solution 1.1 ExID21 statement: Check a pde implicit solution By direct substitution, show that is a solution of the equation: u = f (y − x2 − V (u) x), (1.1) ux + (2 x + V (u)) uy = 0. (1.2) Here f is an arbitrary function and V = V (u) is a given function. Note that: 1. Equation (1.1) defines u implicitly. You have to find ux and uy by implicit differentiation. 2. Equation (1.2) is nonlinear, except for the trivial case when V is a constant function. 1.2 ExID21 answer: Check a pde implicit solution Taking the implicit derivative (with respect to y) in (1.1), we find uy = (1 − x W uy ) G where G = G(ξ) = df dξ =⇒ uy = G , 1 + xW G , ξ = y − x2 − V (u) x, and W = W (u) = ux = − (2 x + V + x W ux ) G =⇒ ux = − dV du (1.3) . Similarly (2 x + V ) G . 1 + xW G (1.4) From (1.3) and (1.4) it follows that u satisfies (1.2). 2 Problem ExID51. Directional derivatives 2.1 ExID51 statement: Directional derivatives Calculate the derivatives indicated below du 1. Express — for u = u(x(s), y(s)) — in terms of x, y, and u, given that: ds x(s) = es , y(s) = s es , and u satisfies x ux + (y + x) uy = 2 x + u. du 1 2. Express — for u = u t2 , ln(t), dt t and t. — in terms of the partial derivatives of u = u(x, y, z) ∂u 3. Let u = ex sin(y), and let (r, θ) be the polar coordinate radius and angle. Calculate and ∂r ∂u in terms of x and y. ∂θ 18.311 MIT, (Rosales) 2.2 Implicit Taylor Expansions. ExID61. 3 ExID51 answer: Directional derivatives We have: du dx dy 1. = ux + uy = x ux + (x + y) uy = 2 x + u. ds ds ds 2. du 1 1 = 2 t ux + uy − 2 uz , where the partial derivatives are evaluated at x = t2 , y = ln(t), dt t t 1 and z = . t 3. Since x = r cos θ and y = r sin θ, we have: r ur = r cos θ ux + r sin θ uy = x ex sin(y) + y ex cos(y), and uθ = −r sin θ ux + r cos θ uy = −y ex sin(y) + x ex cos(y). 3 Problem ExID61. Implicit Taylor Expansions 3.1 ExID61 statement: Implicit Taylor Expansions For the examples below, calculate the Taylor expansion for f (x) up to the order indicated — for example: f (x) = a0 + a1 x + a2 x2 + O(x3 ), for some coefficients an . Do not use a calculator to √ evaluate constants that appear in the expansions √ — e.g., √ 2/π or cos(3). On the other hand, do simplify when possible — e.g., tan(π/4) = 1 or 2/ 2 = 2. 1. Expand up to O(x4 ), where f (x) is defined by x = (1 + f ) sin(f ), with f (0) = 0. 2. Expand up to O(x4 ), where f (x) is defined by f = 1 + x + x2 f 3 , with f (0) = 1. Hint. Write f (x) = f (0) + a1 x + a2 x2 + . . ., substitute into the equation for f , expand, and find PN P n N +1 n ) you can conclude An = Bn . the coefficients. Recall: from N n=0 Bn x + O(x n=0 An x = Small challenge: can you prove this? 3.2 ExID61 answer: Implicit Taylor Expansions We have 1. x = (1 + a1 x + a2 x2 + O(x3 )) (a1 x + a2 x2 + a3 x3 − 61 a31 x3 + O(x4 )) = a1 + (a2 + a21 ) x + (a3 − 16 a31 + 2 a1 a2 ) x2 + O(x3 ) x. Thus a1 = 1, a2 + a21 = 0 ⇒ a2 = −1, a3 − 61 a31 + 2 a1 a2 = 0 ⇒ a3 = Hence f (x) = x − x2 + 13 x3 + O(x4 ). 6 13 , 6 etc. 2. 1 + a1 x + a2 x2 + a3 x3 + O(x4 ) = 1 + x + x2 (1 + 3 a1 x + O(x2 )) = 1 + x + x2 + 3 a1 x3 + O(x4 ). Thus a1 = 1, a2 = 1, a3 = 3, etc. Hence f (x) = 1 + x + x2 + 3 x3 + O(x4 ). Proof of the formula in the hint: Clearly we have A0 − B0 = O(x), thus taking the limit x → 0 P −1 PN −1 n n N yields A0 = B0 . The equality then reduces to N n=0 An+1 x = n=0 Bn+1 x + O(x ). The same argument now yields A1 = B1 . This can be repeated to show An = Bn for all 0 ≤ n ≤ N . 18.311 MIT, (Rosales) 4 4.1 Change of variables for a pde. ExID73. 4 Problem ExID73. Change of variables for a pde ExID73 statement: Change of variables for a pde Let u = u(x, t) be a solution of the heat ut = uxx . (4.1) What equation does φ = − u1 ux satisfy? Hint. Calculate φt and use the equation for u. Calculate φx and write it in terms of u, uxx , and φ2 . Then compute φxx . You should now be able to write φt in terms of φ, φx , and φxx . 4.2 ExID73 answer: Change of variables for a pde We have φt = − u1 uxt + u12 ux ut = − u1 uxxx + φx = − u1 uxx + φ2 . φxx = − u1 uxxx + u12 ux uxx + (φ2 )x . Thus φ satisfies 5 5.1 1 u2 ux uxx , where we have used (4.1). φt + (φ2 )x = φxx . (4.2) ExPD03. Solve the one directional wave equation ExPD03 statement: Solve the one directional wave equation Consider the one directional wave equation for u = u(x, t), where c is a constant: ut + cux = 0. (5.1) Introduce the new independent variables η = x − c t and ξ = x + c t, and change variables to write the equation for u as a function of these new variables: u = u(η, ξ). Using the transformed form of the equation, integrate it to show that it must be u = f (η), (5.2) for some arbitrary function f . Hence, the solutions to (5.1) must have the form u = f (x − c t). 5.2 ExPD03 answer: Solve the one directional wave equation Write u = u(η, ξ), where η = x − c t and ξ = x + c t. Then the chain rule yields: ut = cuξ − cuη , ux = uξ + uη , Thus, in these coordinates equation (5.1) reduces to uξ = 0. Integrating this equation with respect to ξ, yields u = f (η), where f is some arbitrary function. This is equation (5.2). MIT, (Rosales) 6 6.1 Traffic Flow Problem - Series A: TFPa02. 5 TFPa02. Near constant initial data (linearize) Statement: TFPa02. Near constant initial data (linearize) Let q = 4 qm ρ2j ρ (ρj − ρ), where qm is the maximum flow rate and ρj is the jamming concentration. At time t = 0, the concentration is specified by 0 1− where f (x) = for |x| ≥ D, 2 ρ(x, 0) = ρ0 + ρj f (x), (6.1) and D > 0 is some constant distance. (6.2) x for |x| ≤ D, 2 D If 0 < 1 is some small number (e.g.: = 0.1), use linear theory to determine the concentration ρ(x, t) at a later time. In particular, set ρ0 = 0.75 ρj , find the wave speed and draw in space– time (x–t plane) the characteristics marking the front and back of the disturbance. On the same graph, plot the trajectories of the vehicles (which move with the space average velocity u) whose initial positions are x = 0 and x = 2 D. Repeat the exercise for ρ0 = 0.25 ρj and ρ0 = 0.5 ρj . What is un-usual about the last case? For the purposes of the plotting, assume space and time units where D = 1 and qm = ρj — questions: is this possible? What are the units? 6.2 Answer: TFPa02. Near constant initial data (linearize) Write ρ = ρ0 + ρj ρ̃. Then, for 0 < 1, linear theory gives the equation ρ̃t + c0 ρ̃x = 0, 4 qm dq (ρ0 ) = 2 (ρj − 2 ρ0 ) and ρ̃(x, 0) = f (x). dρ ρj where c0 = (6.3) with initial data ρ̃(x, 0) = f (x). Hence ρ̃ = f (x − c0 t), where f is as in (6.2). (6.4) Note also that the vehicle speed, in this linear approximation, is given by u0 = 1. For ρ0 = 0.75 ρj , we have: c0 = − 2. For ρ0 = 0.25 ρj , we have: c0 = 2 qm ρj 2 qm ρj q(ρ0 ) 4 qm = 2 (ρj − ρ0 ) ρ0 ρj and u0 = and u0 = 3 3. For ρ0 = 0.50 ρj , we have: c0 = 0 and u0 = 2 qm qm ρj qm ρj (6.5) . Left panel in figure 6.1. . Middle panel in figure 6.1. . Right panel in figure 6.1. ρj Note that, in each of the three cases, the following applies: 1. Traffic waves move backwards relative to the road. 2. Traffic waves move forwards relative to the road. 3. Traffic waves do not move relative to the road. In all three cases, the cars move faster than the waves. MIT, (Rosales) Traffic Flow Problem - Series A: TFPa06. Waves in red, vehicles in blue. Waves in red, vehicles in blue. Waves in red, vehicles in blue. 1 1 1 0.9 0.9 0.9 0.8 0.8 0.8 0.7 0.7 0.7 0.6 0.6 0.6 t 0.5 t 0.5 t 0.5 0.4 0.4 0.4 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0 −3 −2 −1 0 1 x 2 3 0 −2 6 0.1 −1 0 1 2 3 4 0 −2 −1 x 0 1 2 3 4 x Figure 6.1: Problem TFPa02. Characteristics (in red) and vehicle paths (in blue) for the cases in items 1 through 3 in the problem answer. The characteristics track the front and back of the traffic flow disturbance. The vehicle’s tracked are those starting at x = 0 and x = 2 D = 2. Finally, notice that units that yield D = 1 and qm = ρj are possible: take D as the unit of length, and D ρj /qm as the unit of time. 7 7.1 TFPa06. Solve a first order linear pde Statement: TFPa06. Solve a first order linear pde If a 6= 0, b, and c are constants, show that any function u = u(x, y) that satisfies the partial differential equation a ux + b uy = c u , (7.1) must be of the form u = ec x/a F (b x − a y) , (7.2) where F is an arbitrary function. Hint: Use ξ = b x − a y and η = x as the new independent variables. 7.2 Answer: TFPa06. Solve a first order linear pde As long as a 6= 0 we can change coordinates from (x, y) to (ξ, η), where ξ = b x − a y and η = x. Then, using the chain rule, we have ux = b uξ + uη and uy = −a uξ . Hence, in these new coordinates the equation becomes a uη = c u. (7.3) c η — where F is the “constant” This is, basically, an ode in η, with general solution u = F (ξ) exp a of integration, which can be different for different values of ξ. Thus equation (7.2) follows. MIT, (Rosales) Traffic Flow Problem - Series A: TFPa07. 7 Note: The change of coordinates above is no good when a = 0 (why?), and neither is our solution above. However, when a = 0 6= b, the equation is just b uy = c u, with solution u = F (x) ec y/b . Finally, if a = b = 0, there is not much of an equation to solve. 8 8.1 TFPa07. Solve a first order linear pde Statement: TFPa07. Solve a first order linear pde If c and β are a constants, find the solution of ut + c ux = −β 2 u , 8.2 with initial condition u(x, 0) = sin x. (8.1) Answer: TFPa07. Solve a first order linear pde Introduce the new system of coordinates given by ξ = x − c t and η = t. In these coordinates the equation becomes uη = −β 2 u, which is very easy to solve. We obtain the general solution u = F (ξ) e−β 2 η 2 = F (x − c t) e−β t , where F is an arbitrary function. The solution satisfying u(x, 0) = sin x is then 2 u = sin(x − c t) e−β t . THE END.