Ask Your Question
1

Problem with integration

asked 2021-02-06 12:28:01 +0100

YouTlidi gravatar image

Hi. The problem is present with W10 SageMath notebook 9.1. The calcul take long time (+ one heure) and i don't get the results

var('z,w,x,om')
E1=200
nu=0.33
rho1=7850
Pi=pi.n()
ah=5
e0=0.25
h=1/ah
em=1-sqrt(1-e0)
aa=Pi*z/(2*h)+Pi/(4); 
Ez=E1*(1-e0*(cos(aa)));
rhoz=rho1*(1-em*(cos(aa)));
Q11=Ez;
A11=integral(Q11,z,-h/2,h/2);
B11=integral(Q11*z,z,-h/2,h/2);
D11=integral(Q11*z^2,z,-h/2,h/2);
rhoz1=rhoz
rhoz2=rhoz*z
rhoz3=rhoz*z**2
I0=rhoz1.integral(z,-h/2,h/2);
I1=rhoz2.integral(z,-h/2,h/2);
I2=rhoz3.integral(z,-h/2,h/2);
e1=-I0*om^2/A11;
e2=I1*om^2/A11;
e3=B11/A11;
e4=-(B11*e1+I1*om^2)/(B11*e3-D11);
e5=-I0*om^2/(B11*e3-D11);
e6=(I2*om^2-B11*e2)/(B11*e3-D11);
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-02-06 20:53:11 +0100

Emmanuel Charpentier gravatar image

updated 2021-02-07 17:54:59 +0100

It seems that integral never returns in this use case, at least with Maxima's (default) integrator. This is a bug (now Trac#31351).

Workaround : use algorithm="sympy", which seems to be exempt of this particular quirk.

Or use numerical integration (the current code uses symbolic integration with numerical rather than symbolic constants).

EDIT : Further exploration shows that the problem is Maxima's (see ticket...).

EDIT : Problem reported upstream (see ticket...).

edit flag offensive delete link more

Comments

Thank you for reply

YouTlidi gravatar imageYouTlidi ( 2021-02-07 10:41:00 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2021-02-06 12:28:01 +0100

Seen: 268 times

Last updated: Feb 07 '21