First-Order, First-Degree Differential Equations

In this section, we begin solving differential equations. We will focus specifically on first-order, first-degree differential equations. These are equations where the highest derivative is dydx\frac{dy}{dx} and its power is 1.

The general form of such an equation can be written as: dydx=F(x,y)\frac{dy}{dx} = F(x, y)

There is no single universal method to solve all first-order, first-degree equations. Instead, we classify them into different types and use specific techniques for each. The simplest and most fundamental of these types is the Variable Separable form.

The Variable Separable Method

A differential equation dydx=F(x,y)\frac{dy}{dx} = F(x, y) is said to be in variable separable form if the function F(x,y)F(x, y) can be expressed as a product of two distinct functions, one solely of xx and the other solely of yy.

Mathematically, it looks like this: dydx=f(x)g(y)\frac{dy}{dx} = f(x) \cdot g(y)

The Working Algorithm

  1. Separate: Algebraically rearrange the equation so that all terms containing yy (including dydy) are on one side of the equation, and all terms containing xx (including dxdx) are on the other side. 1g(y)dy=f(x)dx\frac{1}{g(y)} \, dy = f(x) \, dx If we write h(y)=1g(y)h(y) = \frac{1}{g(y)}, then this becomes h(y)dy=f(x)dxh(y) \, dy = f(x) \, dx
  2. Integrate: Apply the integral sign to both sides of the separated equation. h(y)dy=f(x)dx\int h(y) \, dy = \int f(x) \, dx
  3. Add the Constant: Evaluate the integrals and include the constant of integration. H(y)=G(x)+CH(y) = G(x) + C This resulting relation is the general solution of the differential equation.

Handling the Constant of Integration

When you integrate both sides, technically you get two constants: H(y)+C1=G(x)+C2H(y) + C_1 = G(x) + C_2. These are combined into a single arbitrary constant C=C2C1C = C_2 - C_1.

Pro-Tip for Simplification

The constant CC is arbitrary, so we are free to rewrite it in a more convenient form.

  • If logarithms appear on both sides, for example lny=lnx+C\ln|y| = \ln|x| + C, it is often better to write C=lnC1C = \ln|C_1|.
  • Then, lnylnx=lnC1\ln|y| - \ln|x| = \ln|C_1| lnyx=lnC1\ln\left|\frac{y}{x}\right| = \ln|C_1| yx=C1\frac{y}{x} = C_1 so the final form becomes y=Cxy = Cx which is simpler and cleaner.

Example 1: Basic Variable Separation

Find the general solution of the differential equation: dydx=xy\frac{dy}{dx} = \frac{x}{y}.

Solution: Step 1: Separate the variables. Multiply both sides by yy and by dxdx: ydy=xdxy \, dy = x \, dx

Step 2: Integrate both sides. ydy=xdx\int y \, dy = \int x \, dx

Step 3: Evaluate the integrals. y22=x22+C1\frac{y^2}{2} = \frac{x^2}{2} + C_1

Step 4: Simplify. Multiply throughout by 2: y2=x2+2C1y^2 = x^2 + 2C_1 Let 2C1=C2C_1 = C. Then, y2x2=Cy^2 - x^2 = C

Answer: y2x2=Cy^2 - x^2 = C

Example 2: Separation involving Exponentials

Solve the differential equation: dydx=exy\frac{dy}{dx} = e^{x-y}.

Solution: Step 1: Rewrite the right side using exponent laws. dydx=exey\frac{dy}{dx} = e^x e^{-y}

Step 2: Separate the variables. Multiply both sides by eye^y and by dxdx: eydy=exdxe^y \, dy = e^x \, dx

Step 3: Integrate both sides. eydy=exdx\int e^y \, dy = \int e^x \, dx

Step 4: Evaluate the integrals. ey=ex+Ce^y = e^x + C

Answer: ey=ex+Ce^y = e^x + C

Example 3: Finding a Particular Solution

Find the particular solution of the differential equation dydx=4xy2\frac{dy}{dx} = -4xy^2, given that y=1y = 1 when x=0x = 0.

Solution: Step 1: Separate the variables. dyy2=4xdx\frac{dy}{y^2} = -4x \, dx y2dy=4xdxy^{-2} \, dy = -4x \, dx

Step 2: Integrate both sides. y2dy=4xdx\int y^{-2} \, dy = -4 \int x \, dx y11=4(x22)+C\frac{y^{-1}}{-1} = -4 \left(\frac{x^2}{2}\right) + C 1y=2x2+C-\frac{1}{y} = -2x^2 + C This is the general solution.

Step 3: Apply the initial condition y(0)=1y(0)=1. Substitute x=0x=0, y=1y=1: 11=2(0)2+C-\frac{1}{1} = -2(0)^2 + C 1=C-1 = C

Step 4: Substitute C=1C=-1 into the general solution. 1y=2x21-\frac{1}{y} = -2x^2 - 1 Multiply by 1-1: 1y=2x2+1\frac{1}{y} = 2x^2 + 1 Hence, y=12x2+1y = \frac{1}{2x^2 + 1}

Answer: y=12x2+1y = \frac{1}{2x^2 + 1}

Example 4: Separation with Trigonometry

Solve: dydx=1+y21+x2\frac{dy}{dx} = \frac{1 + y^2}{1 + x^2}.

Solution: Step 1: Separate the variables. dy1+y2=dx1+x2\frac{dy}{1+y^2} = \frac{dx}{1+x^2}

Step 2: Integrate both sides. dy1+y2=dx1+x2\int \frac{dy}{1+y^2} = \int \frac{dx}{1+x^2}

Step 3: Use the standard formula 11+t2dt=tan1t\int \frac{1}{1+t^2}dt = \tan^{-1} t. tan1y=tan1x+C\tan^{-1} y = \tan^{-1} x + C

Answer: tan1y=tan1x+C\tan^{-1} y = \tan^{-1} x + C

Example 5: Logarithmic Constant Trap

Solve the differential equation: xdydx+y=0x \frac{dy}{dx} + y = 0.

Solution: Step 1: Rearrange and separate variables. xdydx=yx\frac{dy}{dx} = -y dyy=dxx\frac{dy}{y} = -\frac{dx}{x}

Step 2: Integrate both sides. 1ydy=1xdx\int \frac{1}{y} \, dy = -\int \frac{1}{x} \, dx lny=lnx+C\ln|y| = -\ln|x| + C

Step 3: Since logarithms appear, write the constant in logarithmic form for easy simplification. Let C=lnC1C = \ln|C_1|. Then, lny=lnx+lnC1\ln|y| = -\ln|x| + \ln|C_1|

Step 4: Use logarithm properties. lny+lnx=lnC1\ln|y| + \ln|x| = \ln|C_1| lnxy=lnC1\ln|xy| = \ln|C_1| Therefore, xy=C1xy = C_1 Renaming the arbitrary constant, xy=Cxy = C

Answer: xy=Cxy = C

Example 6: Factoring before Separating

Solve: dydx=1+x+y+xy\frac{dy}{dx} = 1 + x + y + xy.

Solution: Step 1: Factor the right-hand side. 1+x+y+xy=(1+x)+y(1+x)=(1+x)(1+y)1+x+y+xy = (1+x) + y(1+x) = (1+x)(1+y) So the equation becomes dydx=(1+x)(1+y)\frac{dy}{dx} = (1+x)(1+y)

Step 2: Separate the variables. dy1+y=(1+x)dx\frac{dy}{1+y} = (1+x) \, dx

Step 3: Integrate both sides. dy1+y=(1+x)dx\int \frac{dy}{1+y} = \int (1+x) \, dx

Step 4: Evaluate. ln1+y=x+x22+C\ln|1+y| = x + \frac{x^2}{2} + C

Answer: ln1+y=x+x22+C\ln|1+y| = x + \frac{x^2}{2} + C

Example 7: Advanced Trigonometric Separation

Solve: sec2xtanydx+sec2ytanxdy=0\sec^2 x \, \tan y \, dx + \sec^2 y \, \tan x \, dy = 0.

Solution: Step 1: Move one term to the other side. sec2ytanxdy=sec2xtanydx\sec^2 y \, \tan x \, dy = -\sec^2 x \, \tan y \, dx

Step 2: Separate variables by dividing both sides by tanxtany\tan x \tan y. sec2ytanydy=sec2xtanxdx\frac{\sec^2 y}{\tan y} \, dy = -\frac{\sec^2 x}{\tan x} \, dx

Step 3: Integrate both sides. sec2ytanydy=sec2xtanxdx\int \frac{\sec^2 y}{\tan y} \, dy = - \int \frac{\sec^2 x}{\tan x} \, dx

Step 4: Recognize the pattern. Since ddθ(tanθ)=sec2θ\frac{d}{d\theta}(\tan\theta)=\sec^2\theta, each integral is of the form f(θ)f(θ)dθ\int \frac{f'(\theta)}{f(\theta)} d\theta. So, lntany=lntanx+lnC\ln|\tan y| = -\ln|\tan x| + \ln|C|

Step 5: Simplify. lntany+lntanx=lnC\ln|\tan y| + \ln|\tan x| = \ln|C| lntanxtany=lnC\ln|\tan x \tan y| = \ln|C| Therefore, tanxtany=C\tan x \tan y = C

Answer: tanxtany=C\tan x \tan y = C

Example 8: Equation Reducible to Variable Separable (Substitution)

Solve: dydx=(x+y)2\frac{dy}{dx} = (x + y)^2.

Solution: Step 1: This is not directly separable, so use the substitution v=x+yv = x+y

Step 2: Differentiate with respect to xx. dvdx=1+dydx\frac{dv}{dx} = 1 + \frac{dy}{dx} Hence, dydx=dvdx1\frac{dy}{dx} = \frac{dv}{dx} - 1

Step 3: Substitute into the original equation. dvdx1=v2\frac{dv}{dx} - 1 = v^2 dvdx=v2+1\frac{dv}{dx} = v^2 + 1

Step 4: Separate variables. dv1+v2=dx\frac{dv}{1+v^2} = dx

Step 5: Integrate both sides. dv1+v2=dx\int \frac{dv}{1+v^2} = \int dx tan1v=x+C\tan^{-1} v = x + C

Step 6: Replace vv by x+yx+y. tan1(x+y)=x+C\tan^{-1}(x+y) = x + C

Answer: tan1(x+y)=x+C\tan^{-1}(x+y) = x + C

Example 9: Application (Population Growth)

In a certain culture, the bacteria count is 100,000100,000. The number increases by 10%10\% in 2 hours. Assuming the rate of growth is proportional to the number present, formulate the differential equation and solve it.

Solution: Step 1: Let PP be the population at time tt. Given that rate of growth is proportional to population, dPdt=kP\frac{dP}{dt} = kP where kk is a constant.

Step 2: Separate the variables. dPP=kdt\frac{dP}{P} = k \, dt

Step 3: Integrate both sides. 1PdP=kdt\int \frac{1}{P} dP = \int k \, dt lnP=kt+C\ln P = kt + C Since population is positive, we may write directly P=ekt+C=eCekt=P0ektP = e^{kt+C} = e^C e^{kt} = P_0 e^{kt} where P0P_0 is a positive constant.

Step 4: Use the initial condition P(0)=100000P(0)=100000. 100000=P0e0100000 = P_0 e^0 P0=100000P_0 = 100000 So, P(t)=100000ektP(t) = 100000 e^{kt}

Step 5: Use the second condition: after 2 hours, population becomes 110000110000. 110000=100000e2k110000 = 100000 e^{2k} 1.1=e2k1.1 = e^{2k} Taking logarithm, 2k=ln(1.1)2k = \ln(1.1) k=12ln(1.1)k = \frac{1}{2}\ln(1.1)

Step 6: Substitute back. P(t)=100000e(12ln(1.1))tP(t) = 100000 e^{\left(\frac{1}{2}\ln(1.1)\right)t}

Answer: P(t)=100000e(12ln(1.1))tP(t) = 100000 e^{\left(\frac{1}{2}\ln(1.1)\right)t}

Example 10: Mixing Explicit Constants

Solve: dydx=ysinx\frac{dy}{dx} = y \sin x, given y(0)=1y(0) = 1.

Solution: Step 1: Separate variables. dyy=sinxdx\frac{dy}{y} = \sin x \, dx

Step 2: Integrate both sides. dyy=sinxdx\int \frac{dy}{y} = \int \sin x \, dx lny=cosx+C\ln|y| = -\cos x + C

Step 3: Apply the initial condition y(0)=1y(0)=1. ln1=cos0+C\ln 1 = -\cos 0 + C 0=1+C0 = -1 + C C=1C = 1

Step 4: Substitute C=1C=1 into the solution. lny=1cosx\ln|y| = 1 - \cos x Exponentiating, y=e1cosx|y| = e^{1-\cos x} Since y(0)=1>0y(0)=1>0, we choose the positive branch. y=e1cosxy = e^{1-\cos x}

Answer: y=e1cosxy = e^{1-\cos x}