m2m模型翻译
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
450 B

7 months ago
  1. from sympy.core.numbers import E
  2. from sympy.core.symbol import symbols
  3. from sympy.functions.elementary.exponential import log
  4. from sympy.functions.elementary.miscellaneous import sqrt
  5. from sympy.geometry.curve import Curve
  6. from sympy.integrals.integrals import line_integrate
  7. s, t, x, y, z = symbols('s,t,x,y,z')
  8. def test_lineintegral():
  9. c = Curve([E**t + 1, E**t - 1], (t, 0, log(2)))
  10. assert line_integrate(x + y, c, [x, y]) == 3*sqrt(2)