Go to Google Groups Home    comp.soft-sys.math.mathematica
Re: Integration with non-numeric parameters

dimitris <dimmec...@yahoo.com>

On 3    , 13:51, ingramfina...@gmail.com wrote:

> When I use Mathematica to solve the following
> y=x1/(2*sigma^2*t)

> Integrate[y, {t, .5, 1}]

> I get the following answer:

> (0.34657*x1/sigma^2)

> OK, so far, so good. It appears that I can generate an answer with a
> non-numeric parameter. Note that I am looking for an answer in terms
> of x1.

> But when I try

>  q=Exp[-(x1-t)^2/2*sigma^2*t]

> Integrate[q, {t, .5,1}]

> Now Mathematica does not solve this integral, it just repeats the
> command

> I am trying to get an expression in terms of x1. Why do I get a
> statement like this instead of an answer?  There is something about
> the functional form of the integrand that is causing the problem, I
> just don't know what it is.

> Any help you can give me is much appreciated!

Do not mix arbitrary precision numbers with symbolic built in
functions.
Use 1/2 instead of 0.5!

So,

In[43]:=
Clear["Global`*"]

In[44]:=
y = x1/(2*sigma^2*t)

Out[44]=
x1/(2*sigma^2*t)

In[45]:=
Integrate[y, {t, 1/2, 1}]

Out[45]=
(x1*Log[2])/(2*sigma^2)

In[46]:=
q = Exp[(-((x1 - t)^2/2))*sigma^2*t]

Out[46]=
E^((-(1/2))*sigma^2*t*(-t + x1)^2)

In[47]:=
Integrate[q, {t, 1/2, 1}]

Out[47]=
Integrate[E^((-(1/2))*sigma^2*t*(-t + x1)^2), {t, 1/2, 1}]

The latter integral is not a trivial one!

In another CAS,

convert("Integrate[E^((-(1/2))*sigma^2*t*(-t + x1)^2), {t, 1/2,
1}]",FromMma,evaluate);

                    1
                   /              2            2
                  |          sigma  t (-t + x1)
                  |    exp(- -------------------) dt
                  |                   2
                 /
                   1/2

Again the integral is stated unevaluated.

Dimitris