Symbolic Computation of Conservation Laws of Nonlinear PDEs Willy Hereman Department of Mathematical and Computer Sciences Colorado School of Mines Golden, Colorado, U.S.A. whereman@mines.edu http://www.mines.edu/fs home/whereman/ Department of Mathematics and Statistics La Trobe University Bundoora, Australia Thursday, November 29, 2007, 2:00p.m. Acknowledgements – Collaborators Mark Hickman (University of Canterbury, NZ) Bernard Deconinck (University of Washington) Michael Colagrosso (CSM) Ph.D. students: Douglas Poole (CSM) and Michael Nivala (University of Washington) Several undergraduate and graduate students Research supported in part by NSF under Grant CCR-9901929 This presentation was made in TeXpower Outline • Conservation laws of PDEs in n+1 dimensions • Example: Shallow water wave equations (Dellar) • Algorithmic methods for conservation laws • Computer demonstration • Tools: • Euler operators (testing exactness) • Calculus-based formulas for homotopy operator ? symbolic integration by parts ? inversion of the total divergence operator • Application to shallow water wave equations • Conclusions and future work • Software and publications Notation – Computations on the Jet Space • Independent variables x = (x, y, z) • Dependent variables u = (u(1) , u(2) , . . . , u(j) , . . . , u(N ) ) In examples: u = (u, v, θ, h, . . .) ∂k u , ∂xk ∂ k+l u , ∂xk y l • Partial derivatives ukx = • Differential functions Example: f = uvvx + x2 u3x vx + ux vxx for u(x), v(x) • Total derivative (with respect to x) ukx ly = (1) ∂ Dx = + ∂x (1) Mx M x X k=0 etc. (2) ∂ u(k+1)x + ∂ukx M x X k=0 ∂ v(k+1)x ∂vkx is the order of f in u (with respect to x), etc. • Example: f = uvvx + x2 u3x vx + ux vxx (1) (2) Here, Mx = 1 and Mx = 2 • Total derivative with respect to x: 1 X 2 X ∂f ∂f ∂f Dx f = + v(k+1)x + u(k+1)x ∂x k=0 ∂ukx k=0 ∂vkx ∂f ∂f ∂f = + ux + u2x ∂x ∂u ∂ux ∂f ∂f ∂f vx + v2x + v3x ∂v ∂vx ∂v2x = 2xu3x vx + ux (vvx ) + uxx (3x2 u2x vx + vxx ) +vx (uvx ) + vxx (uv + x2 u3x ) + vxxx (ux ) Conservation Laws • Conservation law in (1 + 1) dimensions Dt ρ + Dx J = 0 (on PDE) conserved density ρ and flux J • Example: Korteweg-de Vries (KdV) equation ut + uux + u3x = 0 • Example of a conservation law Dt u3 − 3ux 2 + 3 4 Dx u − 6uux 2 + 3u2 u2x + 3u2x 2 − 6ux u3x = 0 4 • Key property: Dilation invariance • Example: KdV equation and its density-flux pairs are invariant under the scaling symmetry x t (x, t, u) → ( , 3 , λ2 u) λ λ λ is arbitrary parameter. • Some density-flux pairs for the KdV equation: 2 u ρ(1) = u J (1) = + u2x 2 ρ(2) = u2 J (2) 2u3 = + 2uu2x − ux 2 3 ρ(3) = u3 − 3ux 2 J (3) 3 4 = u − 6uux 2 + 3u2 u2x + 3u2x 2 − 6ux u3x 4 .. . ρ(6) = u6 − 60 u3 ux 2 − 30 ux 4 + 108 u2 u2x 2 720 648 216 3 2 u2x − uu3x + u4x 2 + 7 7 7 .. . • Conservation law in (3+1) dimensions Dt ρ + ∇ · J = Dt ρ + Dx J1 + Dy J2 + Dz J3 = 0 (on PDE) conserved density ρ and flux J = (J1 , J2 , J3 ) • Example: Shallow water wave (SWW) equations [P. Dellar, Phys. Fluids 15 (2003) 292-297] 1 ut + (u·∇)u + 2 Ω × u + ∇(θh) − h∇θ = 0 2 θt + u·(∇θ) = 0 ht + ∇·(uh) = 0 where u(x, y, t), θ(x, y, t) and h(x, y, t). • In components: 1 ut + uux + vuy − 2 Ωv + hθx + θhx = 0 2 1 vt + uvx + vvy + 2 Ωu + hθy + θhy = 0 2 θt + uθx + vθy = 0 ht + hux + uhx + hvy + vhy = 0 • SWW equations are invariant under (x, y, t, u, v, h, θ, Ω) → (λ−1 x, λ−1 y, λ−b t, λb−1 u, λb−1 v, λa h, λ2b−a−2 θ, λb Ω) where W (h) = a and W (Ω) = b (a, b ∈ Q). • First few densities-flux pairs of SWW system: uh (1) (1) ρ =h J = vh uhθ (2) (2) ρ = hθ J = vhθ 2 uhθ ρ(3) = hθ2 J(3) = vhθ2 3 h + uv 2 h + 2uh2 θ u ρ(4) = (u2 + v 2 )h + h2 θ J(4) = v 3 h + u2 vh + 2vh2 θ ρ(5) = vx θ − uy θ + 2Ωθ 4Ωuθ − 2uuy θ + 2uvx θ − hθθy 1 (5) J =2 4Ωvθ + 2vvx θ − 2vuy θ + hθθx Additional Examples • Example: Kadomtsev-Petviashvili (KP) equation (ut + αuux + u3x )x + σ 2 u2y = 0 parameter α ∈ IR and σ 2 = ±1. The equation be written as a conservation law Dt (ux ) + Dx (αuux + u3x ) + Dy (σ 2 uy ) = 0. Exchange y and t and set ut = v. ut = v vt = −σ 2 (uxy + αu2x + αuu2x + u4x ) • Examples of conservation laws explicitly dependent on t, x, y. 2 Dt (xux ) +Dx 3u − u2x − 6xuux + xu3x +Dy αxuy = 0 Dt (yux ) +Dx (αyuux + yu3x ) +Dy −σ 2 u + σ 2 yuy = 0 1 √ 2 √ σ2y2 σ2y2 α tu + tu2x + √ ut + √ u3x 2 4 t 4 t ! √ √ √ ασ 2 y 2 + √ uux − x tut − αx tuux − x tu3x 4 t ! √ yu y 2 uy +Dy − √ + √ + x tuy = 0 2 t 4 t √ tu + Dx Dt • Example: Potential KP equation Replace u by ux and integrate with respect to x. uxt + αux u2x + u4x + σ 2 u2y = 0 • Examples of conservation laws (not explicitly dependent on x, y, t). 1 2 Dt (ux ) + Dx αux + u3x + Dy (σ 2 uy ) = 0 2 2 3 2 αux − u22x + 2ux u3x − σ 2 u2y Dt (ux ) + Dx 3 +Dy 2σ 2 ux uy = 0 Dt ux uy + Dx αu2x uy + ut uy + 2u3x uy − 2u2x uxy 1 3 2 2 +Dy σ uy − ux − ut ux + u22x = 0 3 Dt 2αuux u2x + 3uu4x − 3σ 2 u2y + Dx 2αut u2x + 3u2t −2αuux utx − 3utx u2x + 3ut u3x + 3ux ut 2x − 3uut 3x ) +Dy 6σ 2 ut uy = 0 Algorithmic Methods for Conservation Laws • Use Noether’s Theorem (Lagrangian formulation). • Direct methods (Anderson, Bluman, Anco, Wolf, etc.) based on solving ODEs (or PDEs). • Strategy (linear algebra and variational calculus) • Density is linear combination of scaling invariant terms with undetermined coefficients. • Use variational derivative (Euler operator) to compute the undetermined coefficients. • Use the homotopy operator to compute the flux (invert Dx or Div). • Work with linearly independent pieces in finite dimensional spaces. . Computer Demonstration Review of Vector Calculus • Definition: F is conservative if F = ∇f • Definition: F is irrotational or curl free if ∇×F=0 • Theorem (gradient test): F = ∇f iff ∇ × F = 0 Review of Vector Calculus • Definition: F is conservative if F = ∇f • Definition: F is irrotational or curl free if ∇×F=0 • Theorem (gradient test): F = ∇f iff ∇ × F = 0 The curl annihilates gradients! Review of Vector Calculus • Definition: F is conservative if F = ∇f • Definition: F is irrotational or curl free if ∇×F=0 • Theorem (gradient test): F = ∇f iff ∇ × F = 0 The curl annihilates gradients! • Definition: F is incompressible or divergence free if ∇ · F = 0 • Theorem (curl test): F = ∇ × G iff ∇ · F = 0 Review of Vector Calculus • Definition: F is conservative if F = ∇f • Definition: F is irrotational or curl free if ∇×F=0 • Theorem (gradient test): F = ∇f iff ∇ × F = 0 The curl annihilates gradients! • Definition: F is incompressible or divergence free if ∇ · F = 0 • Theorem (curl test): F = ∇ × G iff ∇ · F = 0 The divergence annihilates curls! Review of Vector Calculus • Definition: F is conservative if F = ∇f • Definition: F is irrotational or curl free if ∇×F=0 • Theorem (gradient test): F = ∇f iff ∇ × F = 0 The curl annihilates gradients! • Definition: F is incompressible or divergence free if ∇ · F = 0 • Theorem (curl test): F = ∇ × G iff ∇ · F = 0 The divergence annihilates curls! Question: How can one test that f = ∇ · F ? Review of Vector Calculus • Definition: F is conservative if F = ∇f • Definition: F is irrotational or curl free if ∇×F=0 • Theorem (gradient test): F = ∇f iff ∇ × F = 0 The curl annihilates gradients! • Definition: F is incompressible or divergence free if ∇ · F = 0 • Theorem (curl test): F = ∇ × G iff ∇ · F = 0 The divergence annihilates curls! Question: How can one test that f = ∇ · F ? No theorem from vector calculus! Tools from the Calculus of Variations • Definition: a differential function f is exact iff f = Dx F • Theorem (exactness test): f = Dx F iff (0) Lu(j) (x) f ≡ 0, j = 1, 2, . . . , N • Definition: a differential function f is a divergence if f = Div F • Theorem (divergence test): f = Div F iff (0) Lu(j) (x) f ≡ 0, j = 1, 2, . . . , N Tools from the Calculus of Variations • Definition: a differential function f is exact iff f = Dx F • Theorem (exactness test): f = Dx F iff (0) Lu(j) (x) f ≡ 0, j = 1, 2, . . . , N • Definition: a differential function f is a divergence if f = Div F • Theorem (divergence test): f = Div F iff (0) Lu(j) (x) f ≡ 0, j = 1, 2, . . . , N The Euler operator annihilates divergences! Formula for Euler operator (variational derivative) in 1D: (j) (0) Lu(j) (x) = M x X (−Dx ) k=0 k ∂ (j) ∂ukx ∂ ∂ 2 ∂ 3 ∂ = − Dx (j) + Dx (j) − Dx (j) + · · · (j) ∂u ∂ux ∂u ∂u 2x where j = 1, 2, . . . , N. 3x Formula for Euler operator in 2D: (j) Mx (0,0) Lu(j) (x,y) = (j) My X X kx (−Dx ) (−Dy ) kx =0 ky =0 ∂ ky (j) ∂ukx x ky y ∂ ∂ ∂ = (j) − Dx (j) − Dy (j) ∂u ∂ux ∂uy + D2x ∂ 2 ∂ 3 ∂ +Dx Dy (j) +Dy (j) −Dx (j) (j) ∂u2x ∂uxy ∂u2y ∂u3x where j = 1, 2, . . . , N. ∂ ··· Formula for Euler operator in 3D: (0,0,0) Lu(j) (x,y,z) (j) = (j) (j) M M M y x z X X X kx ky (−Dx ) (−Dy ) (−Dz ) ∂ kz (j) ∂ukx x ky y kz z kx =0 ky =0 kz =0 ∂ ∂ ∂ ∂ = − Dx (j) − Dy (j) − Dz (j) (j) ∂u ∂ux ∂uy ∂uz + D2x ∂ (j) ∂u2x + D x Dy + ∂ (j) ∂uxy D2y ∂ (j) ∂u2y + Dx Dz where j = 1, 2, . . . , N. + D2z ∂ (j) ∂uxz ∂ (j) ∂u2z + Dy Dz ∂ (j) ∂uyz −· · · Application: Testing Exactness Example: f = 3ux v 2 sin u − u3x sin u − 6vvx cos u + 2ux u2x cos u + 8vx v2x where u(x) and v(x) • f is exact • After integration by parts (by hand): Z F = f dx = 4 vx2 + u2x cos u − 3 v 2 cos u • Exactness test with Euler operator: f = 3ux v 2 sin u−u3x sin u−6vvx cos u+2ux u2x cos u+8vx v2x ∂f ∂f 2 ∂f = − Dx + Dx ∂u ∂ux ∂u2x = 3ux v 2 cos u − u3x cos u + 6v vx sin u − 2ux u2x sin u (0) Lu(x) f −Dx [3v 2 sin u − 3u2x sin u + 2u2x cos u] + D2x [2ux cos u] = 3ux v 2 cos u − u3x cos u + 6v vx sin u − 2ux u2x sin u −[3ux v 2 cos u + 6v vx sin u − 3u3x cos u − 6u u2x sin u −2ux u2x sin u + 2u3x cos u] +[−2u3x cos u − 6ux u2x sin u + 2u3x cos u] = 0 Similarly, (0) Lv(x) f ≡ 0. Inverting Dx and Div Problem Statement in 1D • Example: f = 3ux v 2 sin u−u3x sin u−6vvx cos u+2ux u2x cos u+8vx v2x • where u(x) and v(x). Z Find F = f dx. So, f = Dx F Inverting Dx and Div Problem Statement in 1D • Example: f = 3ux v 2 sin u−u3x sin u−6vvx cos u+2ux u2x cos u+8vx v2x • where u(x) and v(x). Z Find F = f dx. So, f = Dx F • Result (by hand): F = 4 vx2 + u2x cos u − 3 v 2 cos u Inverting Dx and Div Problem Statement in 1D • Example: f = 3ux v 2 sin u−u3x sin u−6vvx cos u+2ux u2x cos u+8vx v2x • where u(x) and v(x). Z Find F = f dx. So, f = Dx F • Result (by hand): F = 4 vx2 + u2x cos u − 3 v 2 cos u Mathematica cannot compute this integral! Problem Statement in 2D • Example: f = ux vy − u2x vy − uy vx + uxy vx • where u(x, y) and v(x, y). Find F = Div−1 f so, f = Div F Problem Statement in 2D • Example: f = ux vy − u2x vy − uy vx + uxy vx • where u(x, y) and v(x, y). Find F = Div−1 f so, f = Div F • Result (by hand): F̃ = (uvy − ux vy , −uvx + ux vx ) Problem Statement in 2D • Example: f = ux vy − u2x vy − uy vx + uxy vx • where u(x, y) and v(x, y). Find F = Div−1 f so, f = Div F • Result (by hand): F̃ = (uvy − ux vy , −uvx + ux vx ) Mathematica cannot do this! Problem Statement in 2D • Example: f = ux vy − u2x vy − uy vx + uxy vx • where u(x, y) and v(x, y). Find F = Div−1 f so, f = Div F • Result (by hand): F̃ = (uvy − ux vy , −uvx + ux vx ) Mathematica cannot do this! Can this be done without integration by parts? Problem Statement in 2D • Example: f = ux vy − u2x vy − uy vx + uxy vx • where u(x, y) and v(x, y). Find F = Div−1 f so, f = Div F • Result (by hand): F̃ = (uvy − ux vy , −uvx + ux vx ) Mathematica cannot do this! Can this be done without integration by parts? Can this be reduced to single integral in one variable? Problem Statement in 2D • Example: f = ux vy − u2x vy − uy vx + uxy vx • where u(x, y) and v(x, y). Find F = Div−1 f so, f = Div F • Result (by hand): F̃ = (uvy − ux vy , −uvx + ux vx ) Mathematica cannot do this! Can this be done without integration by parts? Can this be reduced to single integral in one variable? Yes! With the Homotopy operator Tools from Differential Geometry Higher Euler Operators • In 1D (variable x): (j) (i) Lu(j) (x) = M x X k=i k i (−Dx ) k−i ∂ (j) ∂ukx Examples for component u(x): (1) Lu(x) (2) Lu(x) (3) Lu(x) ∂ ∂ 2 ∂ 3 ∂ = − 2Dx + 3Dx − 4Dx + ··· ∂ux ∂u2x ∂u3x ∂u4x ∂ ∂ 2 ∂ 3 ∂ = − 3Dx + 6Dx − 10Dx + ··· ∂u2x ∂u3x ∂u4x ∂u5x ∂ ∂ 2 ∂ 3 ∂ = − 4Dx + 10Dx − 20Dx + ··· ∂u3x ∂u4x ∂u5x ∂u6x • In 2D (variables x and y): (j) (j) My M x X X (ix ,iy ) Lu(j) (x,y)= kx =ix ky =iy k k ∂ x y kx −ix ky −iy (−Dx ) (−Dy ) (j) i x iy ∂u kx x k y y Examples for component u(x, y): ∂ ∂ ∂ 2 ∂ − 2Dx − Dy + 3Dx + ··· ∂ux ∂u2x ∂uxy ∂u3x ∂ ∂ ∂ (0,1) 2 ∂ Lu(x,y) = − 2Dy − Dx + 3Dy + ··· ∂uy ∂u2y ∂uyx ∂u3y ∂ ∂ ∂ ∂ (1,1) 2 Lu(x,y) = − 2Dx − 2Dy + 3Dx + ··· ∂uxy ∂u2xy ∂ux2y ∂u3xy ∂ ∂ ∂ ∂ (2,1) 2 Lu(x,y) = − 3Dx − 2Dy + 6Dx + ··· ∂u2xy ∂u3xy ∂u2x2y ∂u4xy (1,0) Lu(x,y) = • In 3D (variables x, y, and z): (j) (ix ,iy ,iz ) Lu(j) (x,y,z) (j) (j) M M M y x z X X X = kx =ix ky =iy kz =iz kx −ix (−Dx ) • k k k x y z i x i y iz (−Dy ) ky −iy (−Dz ) kz −iz ∂ (j) ∂ukx x ky y kz z Theorem: [Kruskal et al, J. Math. Phys. 11 (1970) 952-960] (i) f = Dxr F iff Lu(j) (x) f ≡ 0 for i = 0, 1, . . . , r−1, j = 1, . . . , N Using the Homotopy Operator • Theorem (integration with homotopy operator): • In 1D: If f is exact then F = D−1 x f = Z f dx = Hu(x) f • In 2D: If f is a divergence then F = Div −1 f = (x) (y) (Hu(x,y) f, Hu(x,y) f ) • In 3D: If f is a divergence then F = Div −1 f = (x) (y) (z) (Hu(x,y,z) f, Hu(x,y,z) f, Hu(x,y,z) f ) • Homotopy Operator in 1D (variable x): Z Hu(x) f = N 1X 0 dλ (Iu(j) f )[λu] λ j=1 with integrand (j) Iu(j) f = MX x −1 Dix (j) u (i+1) Lu(j) (x) f i=0 N is the number of dependent variables and (Iu(j) f )[λu] means that in Iu(j) f one replaces u → λu, ux → λux , etc. More general: u → λ(u − u0 ) + u0 , ux → λ(ux − ux 0 ) + ux 0 , etc. Example: u(x) = (u(1) (x), u(2) (x)) = (u(x), v(x)): 1 Z Hu(x) f = 0 dλ (Iu f + Iv f ) [λu] λ where (1) Iu f = MX x −1 Dix Dix (i+1) u Lu(x) f i=0 and (2) Iv f = MX x −1 i=0 (i+1) v Lv(x) f Simplified Formula in 1D (variable x) Z Hu(x) f = N 1X 0 dλ (Iu(j) f )[λu] λ j=1 where (j) Iu(j) f = MX x −1 Dix (j) u (i+1) Lu(j) (x) f i=0 (j) = MX x −1 i=0 (j) (j) uix M x X k=i+1 (−Dx ) k−(i+1) ∂f (j) ∂ukx Application of Homotopy Operator in 1D Example: f = 3ux v 2 sin u − u3x sin u − 6vvx cos u + 2ux u2x cos u + 8vx v2x • Compute Iu f ∂f ∂f ∂f = u + ux − uDx ∂ux ∂u2x ∂u2x = 3uv 2 sin u − uu2x sin u + 2u2x cos u • Similarly, Iv f • Finally, ∂f ∂f ∂f = v + vx − vDx ∂vx ∂v2x ∂v2x = −6v 2 cos u + 8vx2 Z F = Hu(x) f = 0 Z = 0 1 1 dλ (Iu f + Iv f ) [λu] λ 3λ2 uv 2 sin(λu) − λ2 uu2x sin(λu) + 2λu2x cos(λu) −6λv 2 cos(λu) + 8λvx2 dλ = 4vx2 + u2x cos u − 3v 2 cos u Why does this work? Sketch of Derivation and Proof (in 1D with variable x, and for one component u) Definition: Degree operator M M X ∂f ∂f ∂f ∂f ∂f +· · ·+uM x = u +ux +u2x Mf = uix ∂uix ∂u ∂ux ∂u2x ∂uM x i=0 f is of order M in x Example: f = up uqx ur3x (p, q, r non-negative integers) 3 X ∂f g = Mf = uix = (p + q + r) up uqx ur3x ∂uix i=0 Application of M computes the total degree. Theorem (inverse operator) M−1 g(u) = R1 0 g[λu] dλ λ Proof: d g[λu] = dλ M X ∂g[λu] dλuix i=0 ∂λuix dλ M X 1 ∂g[λu] 1 = uix = Mg[λu] λ i=0 ∂uix λ Integrate both sides with respect to λ Z 1 λ=1 d g[λu] dλ = g[λu]λ=0 = g(u) − g(0) 0 dλ Z 1 Z 1 dλ dλ = Mg[λu] =M g[λu] λ λ 0 0 Assuming g(0) = 0, −1 M Z g(u) = 0 1 dλ g[λu] λ Example: If g(u) = (p + q + r) up uqx ur3x , then g[λu] = (p + q + r)λp+q+r q r p u ux u3x Hence, M−1 g = Z 1 (p + q + r) λp+q+r−1 up uqx ur3x dλ 0 = up uqx ur3x λ=1 p+q+r λ = up uqx ur3x λ=0 Theorem: If f is an exact differential function, then Z F = Dx−1 f = f dx = Hu(x) f Proof: Multiply M X (0) k ∂f Lu(x) f = (−Dx ) ∂ukx k=0 by u to restore the degree. Split off u ∂f . ∂u ∂f Split off ux ∂u . x Integrate by parts. Repeat the process. Lastly, split off uM x ∂u∂f . Mx Explicitly, M X (0) k ∂f uLu(x) f = u (−Dx ) ∂ukx k=0 M M X X ∂f k−1 ∂f k−1 ∂f + ux (−Dx ) = u − Dx u (−Dx ) ∂u ∂ukx ∂ukx k=1 k=1 M X ∂f ∂f ∂f k−1 = u (−Dx ) + ux − Dx u ∂u ∂ux ∂ukx k=1 M M X X k−2 ∂f k−2 ∂f +ux (−Dx ) + u2x (−Dx ) ∂ukx ∂ukx k=2 k=2 = ... ∂f ∂f ∂f = u + ux + . . . + uM x ∂u ∂ux ∂uM x M M X X k−1 ∂f k−2 ∂f (−Dx ) −Dx u + ux (−Dx ) ∂ukx ∂ukx k=1 k=2 M X k−M ∂f + . . . + u(M −1)x (−Dx ) ∂u kx k=M M M−1 M X X X ∂f k−(i+1) ∂f = uix − Dx uix (−Dx ) ∂uix ∂ukx i=0 i=0 k=i+1 M−1 M X X ∂f k−(i+1) = Mf − Dx uix (−Dx ) ∂ukx i=0 k=i+1 = 0 So, M−1 X Mf = Dx i=0 uix M X k−(i+1) (−Dx ) k=i+1 ∂f ∂ukx Apply M−1 and use M−1 Dx = Dx M−1 . M−1 M X X −1 k−(i+1) ∂f f = Dx M uix (−Dx ) ∂ukx i=0 k=i+1 Apply Dx−1 and use the formula for M−1 . Z 1 M−1 M X X dλ ∂f −1 k−(i+1) [λu] F = Dx f = uix (−Dx ) ∂ukx λ 0 i=0 k=i+1 = Hu(x) f using Iu f = M−1 X Dix (i+1) u Lu(x) f i=0 = M−1 X i=0 = M−1 X i=0 M X k i k−(i+1) ∂f Dx u (−Dx ) i + 1 ∂u kx k=i+1 uix M X k−(i+1) (−Dx ) k=i+1 ∂f ∂ukx The latter formula provides a fast algorithm to compute the integrand Iu f. • Homotopy Operator in 2D (variables x and y): (x) Hu(x,y) f Z = N 1X 0 j=1 (x) (Iu(j) f )[λu] dλ λ with (j) Mx −1 (x) Iu(j) f = (j) My X X ix =0 iy =0 1 + ix 1 + ix + iy ! (y) i Dixx Dyy (1+ix ,iy ) u(j) Lu(j) (x,y) f (y) Analogous formulas for Hu(x,y) f and Iu(j) f. Simplified Formula in 2D (variables x and y) (x) Hu(x,y) f (y) Hu(x,y) f Z = N 1X 0 j=1 Z = N 1X 0 j=1 (x) (Iu(j) f )[λu] dλ λ (y) (Iu(j) f )[λu] dλ λ where (j) (x) Iu(j) f = (j) (j) MX y x −1 M X M x X (j) My X ix +iy uix x iy y ix ix =0 iy =0 kx =ix +1 ky =iy (−Dx ) kx −ix −1 −Dy ky −iy ∂f (j) ∂ukx x ky y kx +ky −ix −iy −1 kx −ix −1 kx +ky kx and (j) (y) Iu(j) f = (j) M y −1 x X MX (j) ix +iy iy uix x iy y ix =0 iy =0 (−Dx ) kx −ix M x X (j) My X kx =ix ky =iy +1 −Dy ky −iy −1 ∂f (j) ∂ukx x ky y kx +ky −ix −iy −1 ky −iy −1 kx +ky ky Application of Homotopy Operator in 2D Example: f = ux vy − u2x vy − uy vx + uxy vx By hand: F̃ = (uvy − ux vy , −uvx + ux vx ) • Compute Iu(x) f ∂f ∂f ∂f = u + ux − uDx ∂ux ∂u2x ∂u2x 1 ∂f 1 ∂f + uy − uDy 2 ∂uxy 2 ∂uxy 1 1 = uvy + uy vx − ux vy + uvxy 2 2 • Similarly, Iv(x) f • ∂f =v = −uy v + uxy v ∂vx Hence, Z 1 dλ (x) (x) (x) Iu f + Iv f [λu] F1 = Hu(x,y) f = λ 0 Z 1 1 1 = λ uvy + uy vx − ux vy + uvxy − uy v + uxy v dλ 2 2 0 1 1 1 1 1 1 = uvy + uy vx − ux vy + uvxy − uy v + uxy v 2 4 2 4 2 2 • Analogously, Z 1 dλ (y) (y) (y) F2 = Hu(x,y) f = Iu f + Iv f [λu] λ 0 ! Z 1 1 1 = λ −uvx − uv2x + ux vx + λ (ux v − u2x v) dλ 2 2 0 1 1 1 1 1 = − uvx − uv2x + ux vx + ux v − u2x v 2 4 4 2 2 • So, F= 1 uvy 2 + 41 uy vx − 12 ux vy + 14 uvxy − 12 uy v + 21 uxy v − 12 uvx − 14 uv2x + 41 ux vx + 21 ux v − 12 u2x v Let K = F̃−F then 1 1 1 1 1 1 uv − u v − u v − uv + u v − uxy v y y x x y xy y 2 4 2 4 2 2 K= − 12 uvx + 14 uv2x + 43 ux vx − 21 ux v + 21 u2x v then Div K = 0 • Also, K = (Dy θ, −Dx θ) with θ = 12 uv − 14 uvx − 12 ux v (curl in 2D) Needed: Fast algorithm to remove curl terms (and strategy to avoid curl terms) • Homotopy Operator in 3D (variables x, y, and z): (x) Hu(x,y,z) f Z = N 1X 0 j=1 (x) (Iu(j) f )[λu] dλ λ with (x) Iu(j) f = (j) (j) (j) MX y Mz x −1 M X X ix =0 iy =0 iz =0 ! 1 + ix ix iy iz (j) (1+ix ,iy ,ix ) Dx Dy Dz u Lu(j) (x,y,z) f 1 + i x + iy + iz Analogous formulas for (y) Iu(j) f, and (z) Iu(j) f (y) Hu(x,y,z) f, (z) Hu(x,y,z) f, Simplified Formula in 3D (variables x, y, and z) (x) Hu(x,y,z) f (y) Hu(x,y,z) f (z) Hu(x,y,z) f Z = N 1X 0 j=1 Z = N 1X 0 j=1 Z = N 1X 0 j=1 (x) (Iu(j) f )[λu] dλ λ (y) (Iu(j) f )[λu] dλ λ (z) (Iu(j) f )[λu] dλ λ where (x) Iu(j) (x,y,z) f (j) (j) = (j) MX y Mz x −1 M X X ix +iy +iz iy +iz (j) uix x iy y iz z ix iy ix =0 iy =0 iz =0 (j) (j) Mz (j) Mx My X X X kx =ix +1 ky =iy kz =iz (−Dx ) Integrands kx −ix −1 kx +ky +kz −ix −iy −iz −1 ky +kz −iy −iz kx −ix −1 ky −iy kx +ky +kz ky +kz kx ky −Dy (y) Iu(j) (x,y,z) f ky −iy and (−Dz ) kz −iz (z) Iu(j) (x,y,z) f ∂f (j) ∂ukx x ky y kz z are similar. Computation of Conservation Laws for SWW Quick Recapitulation • Conservation law in (2+1) dimensions Dt ρ + ∇ · J = Dt ρ + Dx J1 + Dy J2 = 0 (on PDE) conserved density ρ and flux J = (J1 , J2 ) • Example: Shallow water wave (SWW) equations 1 ut + uux + vuy − 2 Ωv + hθx + θhx = 0 2 1 vt + uvx + vvy + 2 Ωu + hθy + θhy = 0 2 θt + uθx + vθy = 0 ht + hux + uhx + hvy + vhy = 0 • Typical density-flux pair: ρ(5) = vx θ − uy θ + 2Ωθ 1 4Ωuθ − 2uuy θ + 2uvx θ − hθθy (5) J = 2 4Ωvθ + 2vvx θ − 2vuy θ + hθθx Algorithm • Step 1: Construct the form of the density The SWW equations are invariant under the scaling symmetries (x, y, t, u, v, θ, h, Ω) → (λ−1 x, λ−1 y, λ−2 t, λu, λv, λθ, λh, λ2 Ω) and (x, y, t, u, v, θ, h, Ω) → (λ−1 x, λ−1 y, λ−2 t, λu, λv, λ2 θ, λ0 h, λ2 Ω) Construct a candidate density, for example, ρ = c1 Ωθ + c2 uy θ + c3 vy θ + c4 ux θ + c5 vx θ which is scaling invariant under both symmetries. • Step 2: Determine the constants ci Compute E = −Dt ρ and remove time derivatives ∂ρ ∂ρ ∂ρ ∂ρ ∂ρ E = −( utx + uty + vtx + vty + θt ) ∂ux ∂uy ∂vx ∂vy ∂θ = c4 θ(uux + vuy − 2Ωv + 12 hθx + θhx )x + c2 θ(uux + vuy − 2Ωv + 12 hθx + θhx )y + c5 θ(uvx + vvy + 2Ωu + 12 hθy + θhy )x + c3 θ(uvx + vvy + 2Ωu + 21 hθy + θhy )y + (c1 Ω + c2 uy + c3 vy + c4 ux + c5 vx )(uθx + vθy ) Require that (0,0) (0,0) (0,0) (0,0) Lu(x,y) E = Lv(x,y) E = Lθ(x,y) E = Lh(x,y) E ≡ 0. • Solution: c1 = 2, c2 = −1, c3 = c4 = 0, c5 = 1 gives ρ = 2Ωθ − uy θ + vx θ • Step 3: Compute the flux J E = θ(ux vx + uv2x + vx vy + vvxy + 2Ωux + 21 θx hy − ux uy − uuxy − uy vy − u2y v +2Ωvy − 21 θy hx ) +2Ωuθx + 2Ωvθy − uuy θx −uy vθy + uvx θx + vvx θy Apply the 2D homotopy operator: (x) (y) J = (J1 , J2 ) = Div−1 E = (Hu(x,y) E, Hu(x,y) E) Compute Iu(x) E ∂E ∂E ∂E 1 ∂E 1 ∂E =u +ux −uDx + uy − uDy ∂ux ∂u2x ∂u2x 2 ∂uxy 2 ∂uxy 1 2 = uvx θ + 2Ωuθ + u θy − uuy θ 2 Similarly, compute 1 2 = vvy θ + v θy + uvx θ 2 1 2 (x) Iθ E = θ hy + 2Ωuθ − uuy θ + uvx θ 2 1 (x) Ih E = − θθy h 2 Iv(x) E Next, J1 = = (x) Hu(x,y) E Z 1 Iu(x) E 0 Z = 0 1 dλ (x) (x) (x) + Iv E + Iθ E + Ih E [λu] λ 1 2 2 4λΩuθ + λ 3uvx θ + u θy − 2uuy θ + vvy θ 2 ! 1 2 1 2 1 dλ + v θy + θ hy − θθy h 2 2 2 2 1 1 2 = 2Ωuθ− uuy θ+ uvx θ+ vvy θ+ u θy 3 3 6 1 1 1 2 + v θy − hθθy + hy θ2 6 6 6 Analogously, J2 = (y) Hu(x,y) E 2 1 1 2 1 2 = 2Ωvθ + vvx θ − vuy θ − uux θ − u θx − v θx 3 3 6 6 1 1 + hθθx − hx θ2 6 6 Hence, 112Ωuθ−4uuy θ+6uvx θ+2vvy θ+u2 θy +v 2 θy −hθθy +hy θ2 J= 6 12Ωvθ+4vvx θ−6vuy θ−2uux θ−u2 θx −v 2 θx +hθθx −hx θ2 After removing the curl term 1 4Ωuθ − 2uuy θ + 2uvx θ − hθθy (5) J̃ = 2 4Ωvθ + 2vvx θ − 2vuy θ + hθθx Needed: Fast algorithm to remove curl terms (and strategy to avoid curl terms) Conclusions and Future Work • Scope and limitations of the homotopy operator. −1 Integration by parts, D−1 , and Div . x • Integration of non-exact expressions. Example: f = ux v + uvx + u2 u2x R R 2 f dx = uv + u u2x dx. • Integration of parametrized differential functions. Example: f = aux v + buvx R f dx = uv if a = b. • Broader class of PDEs (other than those of evolution type). • Full implementation in Mathematica. Software packages in Mathematica Codes are available via the Internet: URL: http://www.mines.edu/fs home/whereman/ and via anonymous FTP from mines.edu in directory: pub/papers/math cs dept/software/ Publications 1. W. Hereman, M. Colagrosso, R. Sayers, A. Ringler, B. Deconinck, M. Nivala, and M. S. Hickman, Continuous and Discrete Homotopy Operators and the Computation of Conservation Laws. In: Differential Equations with Symbolic Computation, Eds.: D. Wang and Z. Zheng, Birkhäuser Verlag, Basel (2005), Chapter 15, pp. 249-285. 2. W. Hereman, Symbolic computation of conservation laws of nonlinear partial differential equations in multi-dimensions, Int. J. Quan. Chem. 106(1), 278-299 (2006). 3. W. Hereman, B. Deconinck, and L. D. Poole, Continuous and discrete homotopy operators: A theoretical approach made concrete, Math. Comput. Simul. 74(4-5), 352-360 (2007).