Definite integral with an exponential

I need to integrate this function f=wn.*exp(1i.*2.*pi.*t) to get the numerical result, where the variable function is t, and wn=1. Evalue limits are 0 to 0.9. Can somebody help me?

 Accepted Answer

Your question seems to have changed. With respect to ‘wn(t)’ see my Comment in your original Question.
Try this:
syms wn t u_lim wn(t)
wn(t) = sym(1);
f = wn*exp(1i*2.*pi*t);
cplx_int = int(f, t, 0, 0.9)
cplx_int_n = vpa(cplx_int)
abs_cplx_int_n = abs(cplx_int_n)
cplx_int =
-(5^(1/2)*1i + (10 - 2*5^(1/2))^(1/2) - 3i)/(8*pi)
cplx_int_n =
- 0.093548928378863903321291906615298 + 0.03039588939177436951706748797891i
abs_cplx_int_n =
0.098363164308346596734748787414694

4 Comments

Sorry I had not seen the last comment in the previous question. I tried to use that code but it does not work for the result that I have to get, I just changed the value of the upper limit of the defined integral but the idea is the same, the final result that I should get from the integral is, in this case, 0.9 . The concept is that the function represents a square signal by means of the Fourier transform, calculating its integral must obtain the area under the curve of that signal, as it is a square signal the value that I must obtain as a result is the same as that of my upper limit, only in this case. Basically my confusion is the process in which I can make the calculation of my integral as a result 0.9 for this case. Thank you so much for your patience and your support.
My pleasure.
See if this does what you want:
syms wn t u_lim wn(t)
wn(t) = sym(1);
f = wn*exp(1i*2*pi*t);
upper_limit = vpasolve(abs(int(f, t, 0, u_lim)) == 0.9, u_lim)
abs_upper_limit = abs(upper_limit)
upper_limit =
61.226816497040968522581307264603 - 0.27736049247340612832400314608506i
abs_upper_limit =
61.227444722159630445299229455761
This is my previous code with 0.9 replacing 0.3.
Good day, I want to apologize to you because it seems to have an incorrect data that made my integral did not show the expected result. The problem has already been solved, thank you very much for your help.
My pleasure.
If my Answer helped you solve your problem, please Accept it!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!