Good day,
The integration of a piecewise function below results in a single numeric
number, instead of producing a piecewise equation containing the symbols
'C1', 'C2' and 'C3'.
Is this a bug?
Best regards,
George
~~~~~~~~~~~~~~~~~~~~~~~~
from sympy import symbols, Piecewise
x,y,C1,C2,C3 = symbols('x y C1 C2 C3')
W = 1.0
L = 1.0
A1 = 1.0
A2 = 1.0
sigma_max = 1.0
strain0 = 1.0
strain = C1*x+C2*y+C3
sigma =
1e6*Piecewise((0,strain>0),(A1*strain**2+A2*strain,strain>strain0),(sigma_max,True))
F_c = sigma.integrate((x,-W/2,W/2),(y,-L/2,L/2))
print 'F_c',F_c
~~~~~~~~~Result is:~~~~~~~~~~~~~
F_c 500000.000000000
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.