       Re: Multi-variable Integration

• To: mathgroup at smc.vnet.net
• Subject: [mg79782] Re: [mg79666] Multi-variable Integration
• From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
• Date: Sat, 4 Aug 2007 05:55:21 -0400 (EDT)
• References: <200708010907.FAA01900@smc.vnet.net>

```One possible approach is to use DSolve instead of Integrate. For
example:

f[x, y] /. First[DSolve[D[f[x, y], x] ==
D[g[x, y], x], f[x, y], {x, y}]]

g[x, y] + C[y]

This should work as you intend in most cases of interest, but of
course, the approach may have to be adjusted to particular situations
concrete example of what you wished to do.

Andrzej Kozlowski

On 1 Aug 2007, at 11:07, gravmath at yahoo.com wrote:

> Suppose one defines two expressions in Mathematica:
>
> Q = f[x,y]
> P = f[x,y] + g[y]
>
> and then differentiates them wrt the variable 'x' as follows:
>
> dQ = D[Q,x]
> dP = D[P,x]
>
> Subsequent use of the Integrate command wrt the variable
> 'x' (Integrate[dQ,x] and Integrate[dP,x]) yields, in both cases,
> f[x,y].
>
> I find this behavior understandable from a systems point of view but
> mathematically in both cases the answer should be f[x,y] +
> arbitraryfunc[y], where obviously further input (as in the original
> definitions of P & Q) is needed to determine arbitraryfunc[y].  Is
> there a way to get Mathematica to recognize that there are two
> variables in the problem and to produce the arbitrary function of the
> variable 'y'?
>
> I'm guessing that my specification of f[x,y] is not quite sufficient
> to do this, even though it is sufficient when differentiating.  That
> is to say that dQ and dP are rendered in Mathematica as f^(1,0)[x,y],
> which clearly indicates that Mathematica understands that there are
> two independent variables in the expression.
>
> Any help would be appreciated, even if it to point me to previous
> posts (I found no germane ones myself).
>