Re: Re: Definite Integration in Mathematica

*To*: mathgroup at smc.vnet.net*Subject*: [mg74619] Re: Re: Definite Integration in Mathematica*From*: "Michael Weyrauch" <michael.weyrauch at gmx.de>*Date*: Wed, 28 Mar 2007 01:47:01 -0500 (EST)*References*: <etqo3f$10i$1@smc.vnet.net> <200703260708.CAA11567@smc.vnet.net> <euan2a$dn1$1@smc.vnet.net>

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...) (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.) 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. 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. 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. ?? 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? I would be grateful for further enlightening. Cheers Michael Weyrauch > I am not convinced that there is a genuine need for this. This may be > due my lack of knowledge of applied mathematics but I cannot see any > advantage in having a complicated (non-analytic) anti-derivative, > even a continuous one, on the real axis over simply doing this: > > > g = First[g /. NDSolve[{Derivative[1][g][x] == (4 + 2*x + x^2)/(17 + > 2*x - 7*x^2 + x^4), g[0] == 0}, g, > {x, 0, 4}]]; > > You get a smooth function with which you can perform any computations > you like with excellent accuracy, as you can see from: > > > Plot[{Derivative[1][g][x], (4 + 2*x + x^2)/(17 + 2*x - 7*x^2 + x^4)}, > {x, 0, 4}, > PlotStyle -> {Green, Red}] > > What is there that is useful in applications and that you can do with > a symbolic anti-derivative but you can't with this interpolating > function? > (The situation is quite different in the complex case, where having a > function that is actually complex analytic even in some part of the > complex plane can be a huge advantage over just having an > interpolating function). > > Andrzej Kozlowski >

**Follow-Ups**:**Re: Re: Re: Definite Integration in Mathematica***From:*Daniel Lichtblau <danl@wolfram.com>

**References**:**Re: Definite Integration in Mathematica***From:*"Michael Weyrauch" <michael.weyrauch@gmx.de>

**Re: Cantor Function problem**

**Re: Re: Self-teaching snag**

**Re: Re: Definite Integration in Mathematica**

**Re: Re: Re: Definite Integration in Mathematica**