3
$\begingroup$

I've this differential form:

w = (e^y + z*e^x)dx + ((x + 1) e^y + e^z)dy + ((y + 2) e^z + e^x)dz

It is sure exact, so I'm trying to find a primitive of w.

Integrate[ (E^y + z*E^x) \[DifferentialD]x + ((x + 1) E^y + E^z) \[DifferentialD]y + ((y + 2) E^z + E^x) \[DifferentialD]z, x, y, z]

The expected result is (x+1)e^y + y*e^z + e^x*z + z*e^z, but Mathematica gives me a much more complicated result with other integrals... So, what is the correct procedure for finding such integrals?

$\endgroup$
1
  • $\begingroup$ I think you mean E not e? $\endgroup$
    – Michael E2
    Commented Sep 5, 2020 at 20:32

2 Answers 2

5
$\begingroup$

To solve differential equation you need DSolve or NDSolve, not Integrate. Further, unfortunately, your expected answer is wrong. The correct one you can obtain by:

eq = {D[f[x, y, z], x] == (E^y + z*E^x), 
   D[f[x, y, z], y] == ((x + 1) E^y + E^z), 
   D[f[x, y, z], z] == ((y + 2) E^z + E^x)};
DSolve[eq, f, {x, y, z}]

the simplified result is:

E^y (1 + x) + E^z (2 + y) + E^x z + C[1]
$\endgroup$
1
5
$\begingroup$

From my answer to Exact Differentials :

Block[{dx, dy, dz, e = E},
 {dx, dy, dz} = IdentityMatrix[3];
 exactSolve[w, {x, y, z}]
 ]
(*  E^y + 2 E^z + E^y x + E^z y + E^x z  *)

It is convenient to represent w as a vector field, and the base of the natural log/exp function as E.


An alternative, via a path integral from {0,0,0} to {x,y,z}:

Block[{dx, dy, dz, e = E},
 {dx, dy, dz} = Dt@{x, y, z};   (* replace dx... by differentials *)
 With[{df =  w /.
       v : x | y | z :> v*t /.  (* insert parametrization {x t, y t, z t} *)
      Dt /@ (x | y | z) :> 0 /. (* x, y, z are now constants *)
     Dt[t] -> 1},               (* t is the variable of integration *)
  Integrate[df, {t, 0, 1}]
  ]
 ]
(*  -3 + E^y (1 + x) + E^z (2 + y) + E^x z  *)
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.