Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems with solving integrals in Mathematica 9

129 views
Skip to first unread message

Jost Adler

unread,
Jun 1, 2013, 6:06:07 AM6/1/13
to
Has anybody encountered the same problems with solving integrals in Ver. 9 as I did?

Here a very simple example:

Integrate[D[f[x], x] / f[x], {x, 0, T}]

Version 8.04 gives the correct results:

-Log[f[0]] + Log[f[T]]

In Version 9.00 as well as 9.01 this integral can't be solved. With more complicated integrals I had the same problems. Version 8 gives a solution, Version 9 doesn't!

Could some other Version 9 users try it.

Andrzej Kozlowski

unread,
Jun 2, 2013, 12:25:26 AM6/2/13
to
In my opinion Mathematica is right.

Try the indefinite integral:

Integrate[f'[x]/f[x], x]

Log[f[x]]

No problem. Now, you claim that the correct answer for the definite
integral is -Log[f[0]] + Log[f[T]] but obviously this depends on various
assumptions on f. Simply by taking f(x)=x you will get a
non-convergent integral:

f[x_] := x
Integrate[f'[x]/f[x],{x,0,T}]
During evaluation of In[16]:= Integrate::idiv: Integral of 1/x does
not converge on {0,T}. >>
Integrate[1/x, {x, 0, T}]

Mathematica attempts to give an answer with full generality (expect
perhaps for non-generic cases) and in this no such answer can be given.
Thus, I would argue, this actually represents a fix of a bug in
Mathematica 8.


Andrzej Kozlowski

Dave Snead

unread,
Jun 2, 2013, 12:26:26 AM6/2/13
to
You are correct!
Evaluates the integral in 8.04.
Fails to evaluate the integral in 9.01.
Looks like a bug.

-- Dave Snead

djmpark

unread,
Jun 2, 2013, 12:24:04 AM6/2/13
to
It looks like the 8.04 result is only correct with conditions. It is a
basic change of variable example. The Presentations Application's Student's
Integral routines with a little help from Mathematica Integrate allow us to
evaluate the integral. The integrate routine is an unevaluated Integrate
that allows us to manipulate the integral. It displays as a regular integral
but I'll just show the InputForm here. ChangeIntegralVariable does a
substitution. We then use Integrate but with the assumptions that thr f at
the endpoints are greater than zero. Mathematica does evaluate that.

<< Presentations`

integrate[D[f[x], x]/f[x], {x, 0, T}]
% // ChangeIntegralVariable[t -> f[x], x]
% // UseIntegrate[{f[0], f[T]} > 0]

integrate[f[x]^(-1) Derivative[1][f][x], {x, 0, T}]

integrate[t^(-1), {t, f[0], f[T]}]

ConditionalExpression[Log[f[T]/f[0]], 0 < f[0] < f[T]]

The routines in the Student's Integral sub-package are: integrate,
BasicIntegralTable (basic table used by students), DisplayIntegralTable,
BreakoutIntegral, OperateIntegrand, ChangeIntegralVariable,
IntegrateByParts, TrigonometricSubsitute, LimitsBracket,
EvaluateLimitsBracket, UseIntegralTable, UseIntegrate, UseNIntegrate.

The use of integrate and UseIntegrate[assumptions] is a good method for
displaying an unevaluated integral in a notebook and then evaluating it with
assumptions.


David Park
djm...@comcast.net
http://home.comcast.net/~djmpark/index.html

Richard Fateman

unread,
Jun 3, 2013, 3:25:47 AM6/3/13
to
On 6/1/2013 3:06 AM, Jost Adler wrote:
> Has anybody encountered the same problems with solving integrals in Ver. 9 as I did?
>
> Here a very simple example:
>
> Integrate[D[f[x], x] / f[x], {x, 0, T}]
>
...
In case the previous explanations are too obscure, may I point out that
it is the [second?] fundamental theorem of the integral calculus (FTIC)
which allows one to compute the
integral of f'(x) with respect to x, from A to B
by computing f(B)-f(A).

FTIC requires some constraints on f. Read your favorite calculus text
to learn more. (Depending on the sophistication of your text, you may
see various formulations of these constraints.)

So Mathematica is doing the right thing in version 9 in this situation,
I think.






0 new messages