I can reproduce this. Seems to be an issue with manualintegrate. Can you open an issue in the issue tracker for this?
Aaron Meurer On Thu, Jan 12, 2023 at 12:58 PM Tom van Woudenberg < tom.van.woudenb...@gmail.com> wrote: > Hi there, > > I'm Tom van Woudenberg, lecturer at Delft University of Technology and I'm > new to this group. I've got the following problem when trying to solve an > ODE with a duhamel integral: > > import sympy as sp > omega_n, F_0, m, Omega, zeta = sp.symbols('omega_n, F_0, m, Omega, > zeta',real=True,positive=True) > t = sp.symbols('t',real=True) > u_0, v_0 = sp.symbols('u_0, v_0',real=True) > omega_1, t_tilda = sp.symbols('omega_1, t_tilda',real=True,positive=True) > u_forced = sp.simplify(F_0/m/omega_1 > *sp.integrate(sp.sin(Omega*t_tilda)*sp.exp(-zeta*omega_n*(t-t_tilda))*sp.sin(omega_1*(t-t_tilda)),(t_tilda,0,t))) > print(u_forced) > > u_forced takes extremely long (I never got a solution) to find on the > first run of the cell in a Jupyter Notebook. If it aborted and I run it > another time, it's found in a couple of seconds: > > F_0*(Omega**3*sin(omega_1*t) - > Omega**2*omega_1*exp(omega_n*t*zeta)*sin(Omega*t) - > Omega*omega_1**2*sin(omega_1*t) - > 2*Omega*omega_1*omega_n*zeta*exp(omega_n*t*zeta)*cos(Omega*t) + > 2*Omega*omega_1*omega_n*zeta*cos(omega_1*t) + > Omega*omega_n**2*zeta**2*sin(omega_1*t) + > omega_1**3*exp(omega_n*t*zeta)*sin(Omega*t) + > omega_1*omega_n**2*zeta**2*exp(omega_n*t*zeta)*sin(Omega*t))*exp(-omega_n*t*zeta)/(m*omega_1*(Omega**4 > - 2*Omega**2*omega_1**2 + 2*Omega**2*omega_n**2*zeta**2 + omega_1**4 + > 2*omega_1**2*omega_n**2*zeta**2 + omega_n**4*zeta**4)) > > The same happens in Spyder. > > Any ideas of what is causing this issue? > > Kind regards, > Tom van Woudenberg > > -- > 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 sympy+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/bec838d6-9719-4e57-84bf-848f6fac3c6an%40googlegroups.com > <https://groups.google.com/d/msgid/sympy/bec838d6-9719-4e57-84bf-848f6fac3c6an%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 sympy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6J6Ldr3oBOkD5poKVTZaN8Vt8y43ksKOYV%3DEPvFiqWxVw%40mail.gmail.com.