line_int - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

DEtools

 line_int
 compute F, the solution to Nabla(F) = G, as a line integral when the partial derivatives of F are given

 Calling Sequence line_int(DF, X) line_int(DF, X, check, simp_proc)

Parameters

 DF - list of partial derivatives to be used when computing the line integral X - integration variables list to be used when computing the line integral check - check whether DF is a total derivative before further computations simp_proc - any simplification procedure to be applied to all integrands before evaluating the integrals

Description

 • The line_int command computes the solution to the equation $\nabla \left(F\right)=G$ as a line integral when the partial derivatives of F are given as a list DF. For example, if $\mathrm{DF}=[\mathrm{Fx},\mathrm{Fy},...]$, where $\mathrm{Fx},...$ are partial derivatives of $F$ with respect to $x,..,$ then line_int([Fx, Fy,...], [x,y,...]) will return $F$ up to an additive constant.
 • For a line integral to make sense (return an answer which is correct), DF must be a total derivative. By default, line_int does not check whether DF is true or false. It is, however, possible to force line_int to check $\mathrm{DF}$ before doing any further computations, by including the word check in the calling sequence as the third or fourth argument.
 • By default line_int does not apply any simplification to the integrands before evaluating the line integral. However, in many cases (especially if the dimension of the line integral is greater than 2), it may be convenient to simplify the integrand before performing each integration: Enter a simplification procedure as the third or fourth argument of the command.
 • This function is part of the DEtools package, and so it can be used in the form line_int(..) only after executing the command with(DEtools). However, it can always be accessed through the long form of the command by using DEtools[line_int](..).

Examples

 > $\mathrm{with}\left(\mathrm{DEtools}\right):$

This example uses three variables.

 > $\mathrm{vars}≔\left[x,y,z\right]$
 ${\mathrm{vars}}{≔}\left[{x}{,}{y}{,}{z}\right]$ (1)
 > $\mathrm{eq}≔F\left(\mathrm{op}\left(\mathrm{vars}\right)\right)$
 ${\mathrm{eq}}{≔}{F}{}\left({x}{,}{y}{,}{z}\right)$ (2)
 > $\mathrm{DF}≔\mathrm{map2}\left(\mathrm{diff},\mathrm{eq},\mathrm{vars}\right)$
 ${\mathrm{DF}}{≔}\left[\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{F}{}\left({x}{,}{y}{,}{z}\right){,}\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{F}{}\left({x}{,}{y}{,}{z}\right){,}\frac{{\partial }}{{\partial }{z}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{F}{}\left({x}{,}{y}{,}{z}\right)\right]$ (3)
 > $\mathrm{line_int}\left(\mathrm{DF},\mathrm{vars}\right)$
 ${F}{}\left({x}{,}{y}{,}{z}\right)$ (4)

Here is an example of the most general line integral of two variables.

 > $\mathrm{eq}≔\mathrm{line_int}\left(\left[\mathrm{Fx}\left(x,y\right),\mathrm{Fy}\left(x,y\right)\right],\left[x,y\right]\right)$
 ${\mathrm{eq}}{≔}{\int }{\mathrm{Fy}}{}\left({x}{,}{y}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{y}{+}{\int }{\mathrm{Fx}}{}\left({x}{,}{y}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{+}{\int }\left({\int }{-}\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{Fy}}{}\left({x}{,}{y}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{y}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}$ (5)

This example uses the optional check argument. Let's introduce a 'false' total derivative.

 > $\mathrm{DF}≔\left[{y}^{2},2{x}^{2}y\right]$
 ${\mathrm{DF}}{≔}\left[{{y}}^{{2}}{,}{2}{}{{x}}^{{2}}{}{y}\right]$ (6)

The extra argument check forces the command to verify the integrability conditions; an error message is returned when DF is not a total derivative.

 > $\mathrm{line_int}\left(\mathrm{DF},\left[x,y\right],\mathrm{check}\right)$