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.
> 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?
(*snip*)
It is conventional (by design) that Mathematica returns an expression unevaluated when Mathematica does not know how to evaluate this expression. This can happen for user-defined functions as well as built-in functions (though in special circumstances).
For instance, having started a new Mathematica session, if we try to evaluate f[2], Mathematica just returns f[2] since it has not the slightest idea of what the function f can possibly do.
In[1]:= f[2]
Out[1]= f[2]
Now, we give a definition (a meaning) to the symbol f.
In[2]:= f[x_] = 2 x
Out[2]= 2 x
From now on, evaluating f will return a value.
In[3]:= f[2]
Out[3]= 4
Of course, *Integrate* is a built-in function that has already a meaning. Still, if Mathematica does not know how to find a definite or indefinite integral, it returns the original expression as answer.
For instance, Mathematica knows how to integrate E^(-x^2) (in terms of error function) and E^(-x^3) (in terms of gamma function) but not E^(-x^3 - x^2) (the expression is returned unevaluated).
> 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!
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.
> 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.
> 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!
Hi,
I did not get a value for your integral, but I want to give an advice:
If you use the exact function Integrate[], do not use inexact numbers as boundaries! Or use NIntegrate.
I want to demonstrate this with a function, which is in an optical way similar to yours (I moved one factor t out of the exponential function):