Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Re: Definite Integration in Mathematica


Michael Weyrauch wrote:
> Hello,
> 
>   well, in case that nothing else is available, I am happy with a numerical solution of a problem.
> And that's what NDSolve produces. After all an interpolating function is only a numerical approximation
> to the solution looked for -- admittedly in a form easily worked with.
> 
> However, generally, even if it looks complicated
> an analytical solution has its specific virtues. Just assume that one of the constants in the integral
> would actually be  a parameter, say  a, than I could easily study the parameter dependence of the integral,
> which may produce further insight, e.g. that a certain term may or may not be neglected in the parameter range
> of interest. (That's the way physicists often make progress...)

It's not entirely clear but I believe you are discussing the case of a 
parametrized antiderivative, as opposed to a parametrized definite 
integral. If so, how is this analysis affected by the presence of a 
differential constant in the antiderivative? If not, then it does not 
seem to matter; either the entiderivative is correct, or it is not, and 
in the former case the analysis can proceed. But this is all independent 
of the issue of interval-continuous antiderivatives.


> (By the way I got a few private messages in response to my post in this newsgroup which strongly supported
> the idea that Mathematica should support an option in order to ask for the solution which is
> continouus on the real line.)

Not from anyone who'd actually have to, err, support such a thing.


> So, I conclude, (also from reading some of the papers Dimitris suggested) that there is a genuine point to have
> an explicit (non-numeric) solution of the integral which is continuous and differentiable on the real line if it exists, 
> irrespective how complicated it may look.

Clearly such a form may be used a la Newton-Leibniz for computing 
definite integrals with bounds on the real line. As has been pointed 
out, there are other ways to get such results i.e. by analysis of path 
singularities. The latter approach certainly has its weaknesses. But I'm 
not convinced the former is always viable either. That is, I have no 
idea how to generally construct antiderivatives that are continuous on 
some specified interval such as the real axis.


> Nevertheless, your suggestion to use NDSolve spurred my interest, and I tried to use DSolve in order to determine
> the integral. And here is what I got,
> 
> (*in*)
> sol = DSolve[Derivative[1][f][x] == (x^2 + 2*x + 4)/(x^4 - 7*x^2 + 2*x + 17),
> 
> f, x]
> 
> (*out*)
> 
> {{f -> Function[{x}, (1/2)*ArcTan[(-1 - x)/(-4 + x^2)] -
> 
> (1/2)*ArcTan[(1 + x)/(-4 + x^2)] + C[1]]}}
> 
> It's exactly our good old friend, which is neither continuous nor differentiable at x=2.

Well of course. Did you think DSolve had its own integrator different 
from Integrate? Below one sees how Integrate is called from DSolve in 
this example.

In[1]:= Unprotect[Integrate];

In[2]:= Integrate[a__] := Null /; (Print[InputForm[int[a]]]; False)

In[3]:= InputForm[DSolve[Derivative[1][f][x] == (x^2 + 2*x + 4)/(x^4 - 
7*x^2 + 2*x + 17), f, x]]

int[(4 + 2*x + x^2)/(17 + 2*x - 7*x^2 + x^4), x]

Out[3]//InputForm=
{{f -> Function[{x}, ArcTan[(-1 - x)/(-4 + x^2)]/2 -
      ArcTan[(1 + x)/(-4 + x^2)]/2 + C[1]]}}


> But Mathematica even provides an integration constant so as to make me believe that
> this is the solution up to a constant to be determined by an initial condition.
> On the left hand side of my equation there just is
> f', and what I exspected is a differentiable solution. Or can I also here excuse myself with
> singularities in the complex plane?? I definitely thought that DSolve solves differential
> equations of one or more  REAL variables. ??

I don't see how it can generally do that. It is not given a specific 
interval but only a start point. So solutions are only correct in a 
neighborhood of that point. If input involves analytic functions then I 
think there is a guarantee that the neighborhood is in the complex plane 
(of the independent variable).

I confess I'm out of my area here and there may be issues with singular 
curves and the like, so the term "neighborhood" may need to be taken a 
bit loosely.


> In contrast, NDSolve exactly does this as Andrzej Kozlowski has shown in his post.
> So, at least, I learn that DSolve and NDSolve do different things (sometimes) apart from
> one being analytical and the other numerical.
> Is that really intended and mathematically sound?

How could their respective goals be otherwise accomplished?

Maybe I do not understand your question.


> I would be grateful for further enlightening.
> 
> Cheers   Michael Weyrauch
> [...]


Daniel Lichtblau
Wolfram Research



  • Prev by Date: Re: Pattern evaluation depending on order of definitions
  • Next by Date: Re: Solving a nasty rational differential equation
  • Previous by thread: Re: Re: Definite Integration in Mathematica
  • Next by thread: Re: Definite Integration in Mathematica