Type a command or search the notes. Tab cycles completions. Up and down recall history when blank. Escape dismisses, then leaves the prompt.
MATH
[1251]

Examples from First-order methods

All examples from First-order methods.

Back to First-order methods

Exponential growth with an initial value

For

y′=y(x+3x2),y(0)=1,y'=y(x+3x^2),\qquad y(0)=1,

the initial value is nonzero, so separate on the branch y≠0y\neq0:

dyy=(x+3x2) dx.\frac{dy}{y}=(x+3x^2)\,dx.

Therefore

ln⁡∣y∣=x22+x3+C.\ln|y|=\frac{x^2}{2}+x^3+C.

Since y(0)=1>0y(0)=1>0, the positive branch is selected and the constant is zero:

y=ex2/2+x3.y=e^{x^2/2+x^3}.

A lost equilibrium and a real-domain restriction

For

y′=x1−y2,y'=x\sqrt{1-y^2},

the nonconstant solutions on a real branch satisfy

dy1−y2=x dx.\frac{dy}{\sqrt{1-y^2}}=x\,dx.

Integration gives

arcsin⁡y=x22+C.\arcsin y=\frac{x^2}{2}+C.

The square root requires ∣y∣≤1|y|\leq1. Because arcsin⁡y\arcsin y takes values in [−π/2,π/2][-\pi/2,\pi/2], the implicit relation describes a branch only while x2/2+Cx^2/2+C stays in that range.

The constant solutions y=1y=1 and y=−1y=-1 were lost on division. At a point where a nonconstant branch reaches either level, it can also join a constant branch: the right side is zero there and uniqueness is not guaranteed at ∣y∣=1|y|=1.

A family of circles

For

dydx=−xy,\frac{dy}{dx}=-\frac{x}{y},

multiply by y dxy\,dx and integrate:

y dy=−x dx⟹x22+y22=C.y\,dy=-x\,dx \quad\Longrightarrow\quad \frac{x^2}{2}+\frac{y^2}{2}=C.

After absorbing the factor of 22 into the constant,

x2+y2=C.x^2+y^2=C.

The solution curves are circles, but the original differential equation is undefined when y=0y=0. Thus a circle is represented by an upper or lower graph branch on an interval that does not cross its points on the xx-axis. The initial points (0,7)(0,7), (2,3)(2,3) and (−6,−8)(-6,-8) select respectively

x2+y2=49,x2+y2=13,x2+y2=100.x^2+y^2=49,\qquad x^2+y^2=13,\qquad x^2+y^2=100.

An equation already in product-rule form

For

ex2y′+2xex2y=x,e^{x^2}y'+2xe^{x^2}y=x,

the left side is already (ex2y)′(e^{x^2}y)'. Hence

(ex2y)′=x⟹ex2y=x22+C,(e^{x^2}y)'=x \quad\Longrightarrow\quad e^{x^2}y=\frac{x^2}{2}+C,

and

y=e−x2(x22+C).y=e^{-x^2}\left(\frac{x^2}{2}+C\right).

[routine]

  1. [1]:Integrating factor

A standard first-order linear equation

For

y′+3y=e−x,y'+3y=e^{-x},

the integrating factor is μ=e3x\mu=e^{3x}. Multiplication gives

(e3xy)′=e2x.(e^{3x}y)'=e^{2x}.

Therefore

e3xy=12e2x+C,e^{3x}y=\frac12e^{2x}+C,

so

y=12e−x+Ce−3x.y=\frac12e^{-x}+Ce^{-3x}.

[routine]

  1. [1]:Integrating factor

A singular normal form with a smooth continuation

For

xy′+(x+1)y=2,xy'+(x+1)y=2,

divide by xx only on x>0x>0 or x<0x<0:

y′+(1+1x)y=2x.y'+\left(1+\frac1x\right)y=\frac2x.

On either interval, an integrating factor is

μ(x)=ex+ln⁡∣x∣.\mu(x)=e^{x+\ln|x|}.

Multiplying by a nonzero constant does not change an integrating factor, so we may take μ=xex\mu=xe^x on each chosen interval. Then

(xexy)′=2ex,xexy=2ex+C.(xe^xy)'=2e^x, \qquad xe^xy=2e^x+C.

Thus

y=2x+Ce−xx.y=\frac2x+\frac{Ce^{-x}}{x}.

The normalised equation is valid only for x≠0x\ne0, but the original equation at x=0x=0 still imposes y(0)=2y(0)=2. Choosing C=−2C=-2 gives

y=2(1−e−x)x,y(0)=2y=\frac{2(1-e^{-x})}{x}, \qquad y(0)=2

by continuous extension. Other values of CC do not extend continuously through x=0x=0, so the interval restriction created by division must still be reported.

A polynomial potential

For

(2x+y+3) dx+(2y+x−7) dy=0,(2x+y+3)\,dx+(2y+x-7)\,dy=0,

we have

My=1=Nx,M_y=1=N_x,

so the equation is exact. Integrate MM with respect to xx:

F=x2+xy+3x+h(y).F=x^2+xy+3x+h(y).

Then

Fy=x+h′(y)=x+2y−7,F_y=x+h'(y)=x+2y-7,

which gives h′(y)=2y−7h'(y)=2y-7 and hence h(y)=y2−7yh(y)=y^2-7y. The implicit general solution is

x2+xy+3x+y2−7y=C.x^2+xy+3x+y^2-7y=C.

A potential involving hyperbolic functions

Rewrite

(x2y+y3)y′+xy2+sinh⁡(2x)=0(x^2y+y^3)y'+xy^2+\sinh(2x)=0

as

(xy2+sinh⁡(2x)) dx+(x2y+y3) dy=0.\bigl(xy^2+\sinh(2x)\bigr)\,dx +\bigl(x^2y+y^3\bigr)\,dy=0.

Here

My=2xy=Nx.M_y=2xy=N_x.

Integrating MM with respect to xx gives

F=12x2y2+12cosh⁡(2x)+h(y).F=\frac12x^2y^2+\frac12\cosh(2x)+h(y).

Matching

Fy=x2y+h′(y)=x2y+y3F_y=x^2y+h'(y)=x^2y+y^3

gives h(y)=y4/4h(y)=y^4/4. Therefore

12x2y2+12cosh⁡(2x)+14y4=C.\frac12x^2y^2+\frac12\cosh(2x)+\frac14y^4=C.

A degree-zero right side

For

2xy y′+x2+y2=0,2xy\,y'+x^2+y^2=0,

solve for the derivative:

y′=−x2+y22xy.y'=-\frac{x^2+y^2}{2xy}.

The right side is homogeneous of degree 00. Work on an interval where x≠0x\ne0 and y≠0y\ne0, so the displayed normal form and the substitution v=y/xv=y/x are valid. Put y=xvy=xv, so y′=v+xv′y'=v+xv'. Substitution gives

2x(xv)(v+xv′)+x2+x2v2=0,2x(xv)(v+xv')+x^2+x^2v^2=0,

and, after division by x2x^2,

2xvv′+1+3v2=0.2xvv'+1+3v^2=0.

Separate and integrate:

2v1+3v2 dv=−dxx⟹13ln⁡(1+3v2)=−ln⁡∣x∣+C.\frac{2v}{1+3v^2}\,dv=-\frac{dx}{x} \quad\Longrightarrow\quad \frac13\ln(1+3v^2)=-\ln|x|+C.

Exponentiating gives (1+3v2)∣x∣3=C1(1+3v^2)|x|^3=C_1. The sign of xx is fixed on the chosen interval, so that sign can be absorbed into the constant. Substituting v=y/xv=y/x gives the equivalent implicit solution

x3+3xy2=Cx^3+3xy^2=C

on a chosen interval with x≠0x\neq0 and y≠0y\neq0. Differentiating this relation gives

3x2+3y2+6xy y′=0,3x^2+3y^2+6xy\,y'=0,

which is equivalent to the original equation.

A Bernoulli equation with a zero solution

For

2xy′−y=10x3y5,2xy'-y=10x^3y^5,

use v=y−4v=y^{-4} on a nonzero branch. Since v′=−4y−5y′v'=-4y^{-5}y', multiplying by y−5y^{-5} and rearranging gives

v′+2xv=−20x2.v'+\frac2xv=-20x^2.

The integrating factor is x2x^2, so

(x2v)′=−20x4⟹x2v=−4x5+C.(x^2v)'=-20x^4 \quad\Longrightarrow\quad x^2v=-4x^5+C.

Thus

y−4=v=−4x3+Cx2,y^{-4}=v=-4x^3+\frac{C}{x^2},

or, on intervals where the right side gives a real nonzero solution,

y=±(−4x3+Cx2)−1/4.y=\pm\left(-4x^3+\frac{C}{x^2}\right)^{-1/4}.

These real branches require x≠0x\neq0 and −4x3+C/x2>0-4x^3+C/x^2>0. The solution y=0y=0 is also present in the original equation but is not represented by y−4y^{-4}.

On this page