Skip to main content

Recitation 3

Exact equations

Suppose we have the differential equation M(x,y)+N(x,y)y=0M(x,y)+N(x,y)y'=0 and a region DD. If there is a function Ψ(x,y)\Psi(x,y) so that Ψx(x,y)=M(x,y),Ψy=N(x,y)\Psi_x(x,y) = M(x,y), \Psi_y = N(x,y) for all (x,y)D(x,y)\in D, then we call the differential equation exact in DD. In this case, the implicit solution is Ψ(x,y)=c\Psi(x,y) = c for (x,y)D(x,y)\in D, and we call Ψ(x,y)\Psi(x,y) the potential function.

Theorem (Test for exact differential equation) Suppose the region DD is simply connected. The differential equation M(x,y)+N(x,y)y=0M(x,y)+N(x,y)y'=0 is exact in DD if and only if My(x,y)=Nx(x,y)M_y(x,y) = N_x(x,y) at each (x,y)D(x,y)\in D.

Problem 1 Determine whether each of the equations is exact. If it is exact, find the solution. (a) 3x22xy+2+(6y2x2+3)y=03x^2-2xy+2+(6y^2-x^2+3)y'=0; (b) (exsiny2ysinx)+(excosy+2cosx)y=0(e^x\sin y-2y\sin x)+(e^x\cos y+2\cos x)y'=0.

Solution 1(a) Since 3x22xy+2y=2x\frac{\partial 3x^2-2xy+2}{\partial y} = -2x and 6y2x2+3x=2x\frac{\partial 6y^2-x^2+3}{\partial x} = -2x agree for all (x,y)(x,y), the DE is exact. Let Ψ(x,y)\Psi(x,y) be the potential function. Since Ψx=3x22xy+2\Psi_x = 3x^2 - 2xy + 2, Ψ=x3x2y+2x+C(y)\Psi = x^3 - x^2y + 2x + C(y). Since Ψy=x2+C(y)=6y2x2+3\Psi_y = -x^2 + C'(y) = 6y^2 - x^2 + 3, C(y)=2y3+3yC(y) = 2y^3+3y. The implicit solution to the DE is then x3x2y+2x+2y3+3y=Cx^3-x^2y+2x+2y^3+3y = C.

Solution 1(b) Since exsiny2ysinxy=excosy2sinx\frac{\partial e^x\sin y - 2y\sin x}{\partial y} = e^x\cos y - 2\sin x and excosy+2cosxx=excosy2sinx\frac{\partial e^x\cos y + 2\cos x}{\partial x} = e^x\cos y - 2\sin x agree for all (x,y)(x,y), the DE is exact. Let Ψ(x,y)\Psi(x,y) be the potential function. Since Ψx=exsiny2ysinx\Psi_x = e^x\sin y - 2y\sin x, Ψ=exsiny+2ycosx+C(y)\Psi = e^x\sin y + 2y\cos x + C(y). Since Ψy=excosy+2cosx+C(y)=excosy+2cosx\Psi_y = e^x\cos y + 2\cos x + C'(y) = e^x\cos y + 2\cos x, C(y)=0C(y) = 0. The implicit solution to the DE is then exsiny+2ycosx=Ce^x\sin y + 2y\cos x = C.

Idea It is sometimes possible to convert a differential equation that is not exact into an exact equation by multiplying the equation by a suitable integrating factor.

Problem 2 Given that the integrating factor depends on yy only, solve y+(2xyey)y=0y+(2x-ye^y)y'=0.

Solution Let μ(y)\mu(y) be the integrating factor such that μ(y)y+μ(y)(2xyey)y=0\mu(y)y+\mu(y)(2x-ye^y)y'=0 becomes exact. By the test for exactness, (μ(y)y)y=(μ(y)(2xyey))x(\mu(y)y)_y = (\mu(y)(2x-ye^y))_x, equivalently, μ(y)y+μ(y)=2μ(y)\mu'(y)y + \mu(y) = 2\mu(y). Thus μ(y)\mu(y) satisfies μ=yμ(y)\mu' = y\mu(y) and so μ(y)=y\mu(y) = y. Therefore y2+(2xyy2ey)y=0y^2 + (2xy - y^2e^y)y'=0 is exact. Let Ψ\Psi be the potential function. Since Ψx=y2\Psi_x = y^2, Ψ=xy2+C(y)\Psi = xy^2 + C(y). Since Ψy=2xy+C(y)=2xyy2ey\Psi_y = 2xy + C'(y) = 2xy - y^2e^y, C(y)=y2eydy=ey(y22y+2)C(y) = \int -y^2e^y dy = -e^y(y^2-2y+2). The solution to the DE is then xy2ey(y22y+2)=Cxy^2 - e^y(y^2-2y+2) = C.

Remark In general, MM and NN have to satisfy certain condition so that M(x,y)+N(x,y)y=0M(x,y)+N(x,y)y'=0 has an integrating factor μ\mu that depends on yy only. Let μ(y)\mu(y) be an integrating factor. This means μ(y)M(x,y)+μ(y)N(x,y)y=0\mu(y)M(x,y) + \mu(y)N(x,y)y' = 0 is exact. Thus (μ(y)M(x,y))y=(μ(y)N(x,y))x(\mu(y)M(x,y))_y = (\mu(y)N(x,y))_x. The left hand side equals μM+μMy\mu'M + \mu M_y, and the right hand side equals μNx\mu N_x. This shows μM+μMy=μNx\mu' M + \mu M_y = \mu N_x, that is μ=NxMyMμ\mu' = \frac{N_x - M_y}{M} \mu. The condition for the existence of such μ\mu is that NxMyM\frac{N_x - M_y}{M} depends only on yy.

Orthogonal families of curves

Definition Consider two families of curves F\mathcal{F} and G\mathcal{G}. We say that they are orthogonal whenever any curve from F\mathcal{F} intersects any curve from G\mathcal{G}, and the two curves are orthogonal at the point of intersection.

Example The families y=kxy = kx and x2+y2=r2x^2+y^2=r^2 are orthogonal.

Question Given a family of curves F\mathcal{F}, is it possible to find a family of curves which is orthogonal to F\mathcal{F}?

Example Each line through the origin, that is, y=axy = ax, we have y=ay' = a, and so xy=ax=yxy' = ax = y. In other words, every line in the given family satisfies the DE xy=yxy' = y. Rewrite the DE as y=y/xy' = y/x. The slope diagram is as follows:

Imagine that each little segment in the slope diagram turns 90 degrees:

On one hand, the 2nd slope diagram satisfies the DE y=1/(y/x)=x/yy' = -1/(y/x) = -x/y (why?). On the other hand, a solution (an integral curve) to the 2nd slope will intersect every line through the origin at a right angle (again, why?). This means the family of curves that is orthogonal to the family of lines through the origin satisfies the DE y=x/yy' = -x/y. By separation of variables, x+yy=0x + yy' = 0, and so x2+y2=Cx^2+y^2 = C. This represents the family of circles centered at the origin.

We summarize the above discussion as follows.

Step 1 Find the differential equation associated to the given family of curves F\mathcal{F} and rewrite this differential equation in the explicit form dydx=f(x,y)\frac{dy}{dx} = f(x,y).

Step 2 Write down the differential equation dydx=1f(x,y)\frac{dy}{dx} = \frac{-1}{f(x,y)} associated to the orthogonal family G\mathcal{G}, and solve the differential equation.

Optional step Give a geometric view of the two families.

Exercise 1 Find the orthogonal family of the family of circles x2+y2=2cxx^2+y^2=2cx.

Exercise 2 (Hard) Find the orthogonal family of the family of cardiods x2+y2+ax=ax2+y2.x^2+y^2+ax=a\sqrt{x^2+y^2}.