Example: Solve the equation
.
First we check that this is indeed an exact equation and then we show how to find
.
> M:=(x,y)->1-sin(x)*tan(y);N:=(x,y)->cos(x)/(cos(y))^2;
Here Ex stands for exact.
> diff(M(x,y),y)-diff(N(x,y),x);
> simplify(%);
Since the difference is
, we see that the equation is an exact differential equation. Next, we find
by using the following formula
> Ex;
> simplify(%,trig);
> f:=unapply(Ex,(x,y));