Mathematica Integration Question

  • Context: Graduate 
  • Thread starter Thread starter frenzal_dude
  • Start date Start date
  • Tags Tags
    Integration Mathematica
Click For Summary
SUMMARY

The discussion centers on the integration of a specific function using Mathematica, where the user initially obtained an incorrect result. The integral in question is defined as G(f) involving exponential functions and is computed over three intervals. After correcting the integration limits and applying the FullSimplify function in Mathematica, the user successfully matched their manual calculations with the software's output. The conversation also touches on variable naming conventions in Mathematica, specifically the avoidance of capital letters.

PREREQUISITES
  • Understanding of Fourier Transform properties
  • Familiarity with Mathematica syntax and functions
  • Knowledge of complex exponential functions
  • Basic calculus, specifically integration techniques
NEXT STEPS
  • Learn how to use Mathematica's FullSimplify function effectively
  • Study the implications of variable naming conventions in Mathematica
  • Explore the properties of the sinc function in signal processing
  • Investigate common pitfalls in symbolic integration with Mathematica
USEFUL FOR

Mathematics students, engineers, and researchers using Mathematica for symbolic computation, especially those working with Fourier analysis and integrals.

frenzal_dude
Messages
76
Reaction score
0
Hi, I need to find this integral:

[tex] G(f)=-A\int_{\frac{-3T}{2}}^{\frac{-T}{2}}e^{-j2\pi ft}dt+A\int_{\frac{-T}{2}}^{\frac{T}{2}}e^{-j2\pi ft}dt-A\int_{\frac{T}{2}}^{\frac{3T}{2}}e^{-j2\pi ft}dt[/tex]

Here's the working out I did:

[tex] G(f)=-A[\frac{e^{j\pi fT}-e^{j\pi f3T}}{-j2\pi f}]+\frac{A}{\pi f}[\frac{e^{j\pi fT}-e^{-j\pi fT}}{2j}]-A[\frac{e^{-j\pi f3T}-e^{-j\pi fT}}{-j2\pi f}][/tex]

Therefore:

[tex] G(f)=2TAsinc(fT) -3TAsinc(3fT)[/tex]

But when I used Mathematica I typed this:
Integrate[-A*Exp[-I*2*\[Pi]*f*t], {t, -T/2, (-3*T)/2}] +
Integrate[A*Exp[-I*2*\[Pi]*f*t], {t, -T/2, T/2}] +
Integrate[-A*Exp[-I*2*\[Pi]*f*t], {t, T/2, (3*T)/2}]

and it gave me this:

[tex]\frac{ASin(f\pi T)}{f\pi}-\frac{Ae^{-2j\pi ft}Sin(f\pi T)}{f\pi}+\frac{Ae^{2j\pi ft}Sin(f\pi t)}{f\pi}[/tex]

which equals:

ATsinc(fT) + 2jATsinc(πFT)Sin(2πfT)

Is the answer from Mathematica the correct one?
 
Physics news on Phys.org
frenzal_dude said:
Hi, I need to find this integral:
But when I used Mathematica I typed this:
Integrate[-A*Exp[-I*2*\[Pi]*f*t], {t, -T/2, (-3*T)/2}] +
Integrate[A*Exp[-I*2*\[Pi]*f*t], {t, -T/2, T/2}] +
Integrate[-A*Exp[-I*2*\[Pi]*f*t], {t, T/2, (3*T)/2}]

Looks like you switched the integration limits in the first integral. Also, don't use capital letters for user-variables and you can omit the asterisks for multiplication if you use a space and also you can use FullSimplify to simplify the answer. Finally, and this is just a personal opinion: if I do it manually and then set it up correctly in Mathematica and the integrals are well-behaved, and I get two different answers that I can't show it's really the same answer written differently, good chance I'm the one wrong but there are rare exceptions.
 
ahh thakyou so much! I fixed up the integral and used FullSimplify and now I got the same answer as when I use the Fourier Transform properties, so I know that my working out for the integral must be wrong some where.
Thanks again!

btw why can't we use capital letters as variables in mathematica?
 
Last edited:

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 3 ·
Replies
3
Views
9K