Re: Few MMA questions - need some help!
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg1074] Re: Few MMA questions - need some help!
- From: rubin at msu.edu (Paul A. Rubin)
- Date: Fri, 12 May 1995 17:41:02 -0400
- Organization: Michigan State University
In article <3o6u1g$psn at news0.cybernetics.net>,
pikus at dolphin.physics.ucsb.edu (Fedor G. Pikus) wrote:
->Hi,
->I need some help to make MMA do the calculation I want to:
->
->1. MMA 2.2 cannot take the following integral:
-> Integrate[E^(s t) E^(I wmk t),{t,-Infinity,T}]
->even if I write
-> Integrate[E^(s^2 t) E^(I wmk t),{t,-Infinity,T}]
->which defines that at -Infinity Exp goes to 0, it still cannot take it.
->MMA 2.0 did take this integral, and the one before, where it assumed
->positive s.
This may be a bug in Integrate. I verified that kernel 2.2.2 cannot do it
either; but if you combine the factors in the integrand, you get an answer:
In[1]:= Integrate[ E^((s + I wkm) t), {t, -Infinity, T} ]
Out[1]=
T (s + I wkm)
E
--------------
s + I wkm
->The integral with finite limits
-> Integrate[E^(s^2 t) E^(I wmk t),{t,-A,T}]
->can be computed, but the limit cannot. What it so difficult about
->limit of E^(s^2 t) at t-> -Infinity?
Actually, I was about to say that I'm not sure the answer above is
appropriate. You may be thinking that s is real, but Mathematica doesn't
know that (and perhaps should not assume it). I assume you feel the limit
is 0; but what if s = I?
->2. I need to make MMA compute the integrals like this:
-> Int[t Sum[f[k],{k,Infinity}],{t,0,1}]
->and
-> Int[If[m == n, t, t^2], {t,0,1}]
->to
-> Sum[f[k],{k,Infinity}]
->and
-> If[m == n, 1, 1/2]
->respectively.
You can write your own integration function to do all this:
In[1]:= Clear[ int ];
In[2]:= int[ x_ Sum[ z__ ], y_List ] :=
Sum[ z ] Integrate [x, y ] /; FreeQ[ z, y[[1]] ]
In[3]:= int[ If[ a_, b_, c_ ], d_List ] :=
If[ a,
Evaluate[ Integrate[ b, d ] ],
Evaluate[ Integrate[ c, d ] ]
]
In[4]:= int[ x_, y_List ] := Integrate[ x, y ]
In[5]:= int[ t Sum[ f[k], {k, Infinity} ], {t, 0, 1} ]
Out[5]=
Sum[f[k], {k, Infinity}]
------------------------
2
In[6]:= int[ If[ m== n, t, t^2 ], {t, 0, 1} ]
Out[6]=
1 1
If[m == n, -, -]
2 3
Paul
**************************************************************************
* Paul A. Rubin Phone: (517) 432-3509 *
* Department of Management Fax: (517) 432-1111 *
* Eli Broad Graduate School of Management Net: RUBIN at MSU.EDU *
* Michigan State University *
* East Lansing, MI 48824-1122 (USA) *
**************************************************************************
Mathematicians are like Frenchmen: whenever you say something to them,
they translate it into their own language, and at once it is something
entirely different. J. W. v. GOETHE