CoCalc Public FilesFehlerbetrachtung_Brechung_an_der_Grenzschicht_2019-03-17-175700.sagewsOpen with one click!
Author: Andreas Schuldei
Views : 18
Compute Environment: Ubuntu 18.04 (Deprecated)
# epsilon ersatz e_ersatz(e1,e2,d1,d2) = (e1*e2* (d1 + d2)) / (d1*e2 + d2*e1) #relative error rel_error(value_with_error,value_exact) = (value_with_error/value_exact) -1 x,z, xm, xs, zs, z2, d1, d2, em, es =var('x z xm xs zs z2 d1 d2 em es') equations = [d1 == sqrt(xm*xm + zs*zs), d2 == sqrt(z2*z2 + xs*xs), xm + xs == x, zs + z2 == z, (xm/zs)/(xs/z2) == (em/es)] solve(equations,[d1, d2, xm, xs, z2], algorithm="sympy", solution_dict=False)
[{d2: sqrt(es^2*x^2*(z - zs)^2/(es*z + em*zs - es*zs)^2 + (z - zs)^2), xm: em*x*zs/(es*z + em*zs - es*zs), z2: z - zs, d1: sqrt(em^2*x^2*zs^2/(es*z + em*zs - es*zs)^2 + zs^2), xs: es*x*(z - zs)/(es*z + em*zs - es*zs)}]