Professional Documents
Culture Documents
Am2580 HW1
Am2580 HW1
Am2580 HW1
Manuel Snchez Uribe a Problem. 1. Consider the Inviscid Burgers equation ut + ( u2 )x = 0 2 u(x, 0) = sin(x)
02.06.2012
x [0, ]
Write a small code to compute u(x, t) for all x [0, ] and t > 0. Solution. We use the Characteristics Method, obtaining the following ODE dx(t) = sin(x) dt x(0) = x0 The solution of it is given by x(t) = x0 + t sin(x0 ) we plot the Characteristics lines in Figure(1)
2 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 0 0.5 1 1.5 X(t) 2 2.5 3 t
Figure(1): Characteristics lines. There are not shocks in the interval [0, ]. Since there are not shocks in [0, ] [0, ) we can conclude that the solution u(x, t) is given by the following implicit equation u(x, t) = u0 (x0 ) = sin(x0 ) = sin(x u(x, t)t) 1
Therefore, we have to solve rst the nonlinear problem associated to x0 and then obtain the value of u(x, t). Given (, t) [0, ] [0, ), x0 is the solution of: x x0 t sin(x0 ) x = 0 and the exact solution and the point (, t) is given by x u(, t) = sin(x0 ). x
Figure(2): Exact solution u(x, t) in [0, ] [0, 2]. Examples of the exact solution: In order to present the results of the code, we show some examples of (, t) and the respective x values of the function u(, t). x x 0 0 /4 /2 3/4 4/5 t 0 1 1 1.2 1.4 1.6 100 1000 u(, t) x 0 0 0.3875 0.6827 0.8936 0.8879 0.0311 0.0031
Table 1