packages feed

egison-5.1.0: sample/physics/tension3.egi

--
-- This file has been auto-generated by egison-translator.
--

declare symbol α, β, γ, c, p, l

def C : Matrix MathValue := [|[|α, 0, 0|], [|0, β, 0|], [|0, 0, γ|]|]

def I (C: Matrix MathValue) : MathValue := trace C

def II (C: Matrix MathValue) : MathValue := (trace C ^ 2 - trace (M.* C C)) / 2

def III (C: Matrix MathValue) : MathValue := M.det C

def I' (C: Matrix MathValue) : MathValue := I C / III C ^ (1 / 3)

def II' (C: Matrix MathValue) : MathValue := II C / III C ^ (2 / 3)

def W : MathValue := c_1 * (I' C - 3) + c_2 * (II' C - 3)

def S_i_j : Matrix MathValue := 2 * ∂/∂ W C~i~j - p * (M.inverse C)_i_j

expandAll (substitute [(α, l), (β, 1 / sqrt l), (γ, 1 / sqrt l)] S_#_#)