Why are the values of z1 and z2 false in the special case a=0?
1 次查看(过去 30 天)
显示 更早的评论
Hi,
Why are the values of z1 and z2 false in the special case a=0?
clear
syms t
syms a real
x(t) =exp(-a*t)*heaviside(t)
z1 = int(x(t),t, -inf, inf)
z2 = int(exp(-a*t),t,0, +inf)
A big thank you in advance!
5 个评论
Walter Roberson
2024-1-21
Testing what it should be if a is 0, which gives exp(-0*t) which gives exp(0) which is 1
syms t
x(t) = heaviside(t);
z1 = int(x, t, -inf, +inf)
z2 = int(x, t, 0, +inf)
Paul
2024-1-21
编辑:Paul
2024-1-23
Trying it this way does not even allow for the possibility that a = 0.
syms t
syms a real
x(t) = exp(-a*t)*heaviside(t);
syms b n1 n2
assume([b n1 n2] < 0)
syms c p1 p2 positive
z1 = limit(int(x(t),t,b,n1),b,-inf) + limit(int(x(t),t,n1,n2),n2,0,'Left') ...
+ limit(int(x(t),c,p1),c,0,'Right') + limit(int(x(t),p1,p2),p2,inf);
z1 = simplify(z1)
z2 = limit(int(exp(-a*t),t,c,p1),c,0,'Left') + limit(int(exp(-a*t),t,p1,p2),p2,inf);
z2 = simplify(z2)
subs(z2,a,0)
Apparently int evaluates these imporoper integrals with a different approach, though I thought what I did here is the formal defintions of these improper integrals.
I'm actually quite surprised by the results in the original question insofar as I don't see int return a piecewise result for other cases where it could.
For example:
f(t) = triangularPulse(t);
syms n integer
c(n) = int(exp(-1j*2*sym(pi)/4*n*t)*f(t),t,-inf,inf)
try
c(0);
catch ME
ME.message
end
However, c(0) is well defined, as we can see by subbing in n = 0 into the integrand and then integrating
C0 = int(exp(-1j*2*sym(pi)/4*0*t)*f(t),t,-inf,inf)
Why didn't int() return a piecewise expression for c(n) in the first place? I've always thought that "int just doesn't do that," but this Question shows that it can. I wonder if int recognizes the expression for c(n) as a Fourier integral and resorts to fourier instead of computing the integral other using other means.
回答(1 个)
SAI SRUJAN
2024-1-30
Hi Mohamed,
I understand that you are trying to examine the values of 'z1' and 'z2' in a special case where 'a = 0'.
In this specific case, both 'z1' and 'z2' approach infinity, because the integrals of the functions 'exp(-a*t)' and 'exp(-a*t)*heaviside(t)' become improper integrals that diverge when 'a = 0'. Let's break down each integral:
For `z1`, the integral is calculated as:
z1 = int(x(t), t, -inf, inf)
Since `a = 0`, the exponential term becomes `exp(0*t) = 1`, and the integral becomes:
z1 = int(1, t, -inf, inf)
This is the integral of a constant function over an infinite interval, which is unbounded and thus diverges to infinity.
For `z2`, the integral is calculated as:
z2 = int(exp(-a*t), t, 0, +inf);
Since `a = 0`, the exponential term becomes `exp(0*t) = 1`, and the integral becomes:
z2 = int(1, t, 0, +inf)
This integral also represents an area under the constant function 1 from 0 to inf, which is again unbounded.
In the particular situation where 'a = 0', the integrals for both 'z1' and 'z2' turn out to be infinite. Therefore, they are deemed "inf" since the result of the integration isn't a finite value.
I hope this helps!
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!