Skip to main content

Recitation 2

Method of Integrating Factors

An integrating factor is a function by which an ordinary differential equation can be multiplied in order to make it integrable.

Problem 1 Solve y=2y+3exy' = 2y + 3e^x.

Solution The big idea of integrating factor is to multiply both sides of the DE y2y=3exy' - 2y = 3e^x by μ(x)\mu(x) so that the left hand side becomes (μy)(\mu y)'. In other words, μ\mu ought to satisfy (μy)=μy2μy(\mu y)' = \mu y' - 2\mu y.

By the product rule, we get μy+μy=μy2μy\mu y' + \mu' y = \mu y' - 2\mu y, which gives μ=2μ\mu' = -2\mu. The solution of the last DE is μ(x)=e2x\mu(x) = e^{-2x}. Thus multiplying both side of y2y=3exy' - 2y = 3e^x by the integrating factor gives (e2xy)=3ex(e^{-2x}y)' = 3e^{-x}. Integrate the last equation, e2xy=3ex+Ce^{-2x}y = -3e^{-x} + C, hence y=3ex+Ce2xy = -3e^x + Ce^{2x}.

Remark In general, the integrating factor of y+p(x)y=q(x)y' + p(x)y = q(x) is μ(x)=expp(x)dx\mu(x) = \exp \int p(x) dx.

Problem 2 Solve y+1xy=3cos2xy' + \frac{1}{x} y = 3\cos 2x for x>0x > 0.

Solution The integrating factor is exp1xdx=explnx=x\exp \int \frac{1}{x} dx = \exp \ln x = x. Multiplying both sides of the DE, we have (xy)=3xcos2x(xy)' = 3x\cos 2x, and so xy=3xcos2xdxxy = \int 3x\cos 2x dx. Using integration by parts, we get xy=3xcos2xdx=34(2xsin2x+cos2x)+Cxy = \int 3x \cos 2x dx = \frac{3}{4}(2x\sin 2x+\cos 2x) + C, and so y=34(2sin2x+1xcos2x)+Cxy = \frac{3}{4}(2\sin 2x + \frac{1}{x}\cos 2x) + \frac{C}{x}.

Separable Equations

A separable differential equation is an equation of the form a(x)dx=b(y)dya(x)dx=b(y)dy. Let A(x),B(y)A(x), B(y) be the anti-derivative of a(x),b(y)a(x), b(y). Then A(x)=B(y)+CA(x) = B(y) + C for some constant CC depending on the initial condition. In general, you can solve separable equations essentially by “separating the two variables xx and yy, and you can then usually solve for yy in terms of xx.

Problem 3 Solve dy/dx=x2/y2dy/dx=x^2/y^2 with the initial condition y(0)=2y(0)=2.

Solution Separate the tow variables y2dy=x2dxy^2dy = x^2dx. Integrate and get 13y3=13x3+C\frac{1}{3}y^3 = \frac{1}{3}x^3 + C, that is, y3=x3+Cy^3 = x^3 + C. Using the initial condition, C=8C = 8.

Problem 4 Find the implicit solution of dy/dx=y4xxydy / dx = \frac{y-4x}{x-y}.

Solution We cannot directly separate the two variables. However, because the equation is a homogeneous differential equation, heuristically, the substitution v=y/xv=y/x helps. Since y=vxy = vx, we have dydx=xdvdx+v\frac{dy}{dx} = x \frac{dv}{dx} + v and y4xxy=y/x41y/x=v41v\frac{y-4x}{x-y} = \frac{y/x-4}{1-y/x} = \frac{v-4}{1-v}. We write the DE of xx and yy as a DE of xx and vv: xdvdx+v=v41vx \frac{dv}{dx} + v = \frac{v-4}{1-v} and so xdvdx=v41vv=v241vx\frac{dv}{dx} = \frac{v-4}{1-v}-v=\frac{v^2-4}{1-v}. Now separate the two variables 1vv24dv=dxx\frac{1-v}{v^2-4}dv = \frac{dx}{x}. Integrate and get 14lnv234lnv+2=lnx-\frac{1}{4}\ln |v-2|-\frac{3}{4}\ln |v+2| = \ln |x|, that is, lnv2+3lnv+2=4lnx+C\ln |v-2| + 3\ln |v+2| = -4\ln |x| + C. Exponentiation both sides gives (v2)(v+2)3=Ax4(v-2)(v+2)^3=Ax^{-4}. Multiplying both sides by x4x^4 gives (vx2x)(vx+2x)3=A(vx-2x)(vx+2x)^3=A. Recall vx=yvx = y, we obtain (y2x)(y+2x)3=A(y-2x)(y+2x)^3=A.

Curve of fastest descent

Johann Bernoulli posed the problem of the brachistochrone to the readers of Acta Eruditorum in June, 1696. He said,

I, Johann Bernoulli, address the most brilliant mathematicians in the world. Nothing is more attractive to intelligent people than an honest, challenging problem, whose possible solution will bestow fame and remain as a lasting monument. Following the example set by Pascal, Fermat, etc., I hope to gain the gratitude of the whole scientific community by placing before the finest mathematicians of our time a problem which will test their methods and the strength of their intellect. If someone communicates to me the solution of the proposed problem, I shall publicly declare him worthy of praise…

and he wrote the problem statement as

Given two points A and B in a vertical plane, what is the curve traced out by a point acted on only by gravity, which starts at A and reaches B in the shortest time.

In 1697 Johann Bernoulli used Fermat’s principle to derive the brachistochrone curve by considering the trajectory of a beam of light in a medium where the speed of light increases following a constant vertical acceleration.

By the conservation of energy, the instantaneous speed vv after falling a height yy in a uniform gravitational field is given by v=2gyv=\sqrt{2gy}.

Bernoulli noted that the Snell’s law (also known as the law of refraction) gives a constant of the motion for a beam of light in a medium of variable density: sinθ/v=1/vm\sin\theta / v = 1 / v_m, where vmv_m is the constant and θ\theta represents the angle of the trajectory with respect to the vertical.

Problem 5 Show that the Brachistochrone curve is given by a function y=y(x)y = y(x) that satisfies the differential equation y=k2/y1y' = \sqrt{k^2/y-1}, where kk is a constant to be determined later.

Solution On one hand, the Snell’s law gives 2gy/sinθ=vm\sqrt{2gy} / \sin \theta = v_m, and so sinθ=y/k\sin \theta = \sqrt{y}/k for some constant kk. On the other hand, dydx\frac{dy}{dx} is the slope of the line tangent to the curve, and the slope is dydx=cotθ\frac{dy}{dx} = \cot \theta. Recall that cotθ=1sin2θsinθ\cot\theta = \frac{\sqrt{1-\sin^2\theta}}{\sin\theta}. We can eliminate θ\theta and get the desired DE.

The solution to the differential equation y=k2/y1y' = \sqrt{k^2/y-1}, which describes a curve, is known as the cycloid. For more history on the problem of the brachistochrone, check the awesome video by 3Blue1Brown below.