Also note if you use the residue theorem there is a different path depending on whether t>0 or t<0.  This means when you calculate the residue you only use one pole (phi+ or phi-) depending on the path.  The path chosen makes sure that the part of it not on the real axis does not contribute to the integral.

On 2/6/23 10:36 AM, 'Tom van Woudenberg' via sympy wrote:
Hi there,

When trying to solve a integral as part of a manual inverse fourier transform, SymPy return the unevaluated integral. Does anybody know if SymPy is able to solve this integral with some help? It would be good enough if I'd be able to obtain the result for specific values of t.

import sympy as sp
phi,t = sp.symbols('phi,t',real=True)
sp.I*(1 - sp.exp(4*sp.I*sp.pi*phi))*sp.exp(-8*sp.I*sp.pi*phi)/(2*sp.pi*phi*(-4*sp.pi**2*phi**2 + 1.5*sp.I*sp.pi*phi + 4)) solution_numeric = 1 / sp.pi * sp.integrate(sp.re(solution_in_frequency_domain_numeric*sp.exp(sp.I*2*phi*t)),(phi,0,4))
print(solution_numeric)

returns:
(Integral(sin(4*pi*phi)*re(exp(2*I*phi*t)/(-4*pi**2*phi**2*exp(8*I*pi*phi) + 1.5*I*pi*phi*exp(8*I*pi*phi) + 4*exp(8*I*pi*phi))), (phi, 0, 4)) + Integral(cos(4*pi*phi)*im(exp(2*I*phi*t)/(-4*pi**2*phi**2*exp(8*I*pi*phi) + 1.5*I*pi*phi*exp(8*I*pi*phi) + 4*exp(8*I*pi*phi))), (phi, 0, 4)) + Integral(-im(exp(2*I*phi*t)/(-4*pi**2*phi**2*exp(8*I*pi*phi) + 1.5*I*pi*phi*exp(8*I*pi*phi) + 4*exp(8*I*pi*phi))), (phi, 0, 4)))/(2*pi**2*phi)

Plotting the result for t,0,15 should give this result according to Maple:
Schermafbeelding 2023-02-06 163521.jpg

Kind regards,
Tom van Woudenberg
Delft University of Technology
--
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/eea7eaef-8752-41f8-bf9d-ba78a1782c37n%40googlegroups.com <https://groups.google.com/d/msgid/sympy/eea7eaef-8752-41f8-bf9d-ba78a1782c37n%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/53295aba-0b8e-71ba-5a8b-75750e2905a9%40gmail.com.

Reply via email to