Chalk−1

Math · Calculus II · Worked example

Solve a separable differential equation

Solve d⁢y⁢/⁢d⁢x=2⁢x⁢y with the initial condition y⁢(0)=3.

d⁢yd⁢x=2⁢x⁢y,y⁢(0)=3

Try one — Chalk checks each line

Find the two factors

The right side 2⁢x⁢y is 2⁢x times y, a function of x times a function of y. The equation is separable with g⁡(x)=2⁢x and h⁢(y)=y.

d⁢yd⁢x=2⁢x⋅y

Set the equilibrium aside

h⁢(y)=y is zero only at y=0. The constant function y=0 has derivative 0, and 2⁢x⋅0=0, so it is a solution. Keep it in mind, because the next step divides by y.

Separate the variables

For y≠0, divide both sides by y and multiply by d⁢x. Every y is now on the left beside d⁢y, and every x is on the right beside d⁢x. In a Math box this row also matters to the Checker, which tests the solution rows below it against the equation.

d⁢yy=2⁢xd⁢x

Integrate both sides

∫d⁢y⁢/⁢y=ln∣⁢y⁢∣ and ∫2⁢x d⁢x=x2. The two antiderivatives differ by one constant, so C goes on one side only.

ln∣⁢y⁢∣=x2+C

Solve for y

Raise e to both sides to get ∣⁢y⁢∣=eC⋅ex2. Removing the absolute value gives y=Aex2, where A=±eC. The value A=0 gives back the equilibrium y=0, so y=Aex2 with any A is the general solution.

y=Aex2

Apply the initial condition

At x=0 the solution is Ae0=A, and the condition says it is 3. That makes A=3, which gives the particular solution.

y⁢(0)=A=3⟹y=3ex2

Check by differentiating

By the chain rule, y′=3ex2⋅2⁢x =6⁢xex2, and 2⁢x⁢y=2⁢x⋅3ex2 =6⁢xex2. The two agree for every x, and y⁢(0)=3. The solution is defined for every real x.

dd⁢x(3ex2)=6⁢xex2=2⁢x⋅3ex2

Result

y=3ex2, defined for every real x.

y=3ex2

Your turn

1. One like the example

Solve d⁢y⁢/⁢d⁢x=3x2y with y⁢(0)=2.

Show the answer and explanation

y=2ex3.

The factors are g⁡(x)=3x2 and h⁢(y)=y. Separating gives d⁢y⁢/⁢y=3x2 d⁢x, and integrating gives ln∣⁢y⁢∣=x3+C, so y=Aex3. At x=0 the solution is A, so A=2.

d⁢yd⁢x=3x2yy⁢(0)=2d⁢yy=3x2d⁢xln∣⁢y⁢∣=x3+Cy=Aex3y=2ex3

2. A variation

Solve d⁢y⁢/⁢d⁢x=2⁢x⁢(y−1) with y⁢(0)=4. The y-part is now y−1, not y.

Show the answer and explanation

y=1+3ex2.

Divide by y−1, which is allowed for y≠1, to get d⁢y⁢/⁢(y−1)=2⁢x d⁢x. Integrating gives ln∣⁢y−1⁢∣=x2+C, so y−1=Aex2 and y=1+Aex2. At x=0, y=1+A=4, so A=3. The equilibrium is y=1 here, the case A=0.

d⁢yd⁢x=2⁢x⁢(y−1)y⁢(0)=4d⁢yy−1=2⁢xd⁢xln∣⁢y−1⁢∣=x2+Cy=1+Aex2A=3y=1+3ex2

3. Somewhere new

A patient’s blood holds 50 mg of a medicine, and the body removes the medicine at a rate equal to 20⁢% of the amount present, per hour, so d⁢A⁢/⁢d⁢t=−0.2⁢A. Find A⁢(t), and find when 10 mg remain.

Show the answer and explanation

A⁢(t)=50e−0.2⁢t mg, and 10 mg remain after 5ln5≈8.05 hours.

Separating gives d⁢A⁢/⁢A=−0.2 d⁢t, so ln∣⁢A⁢∣=−0.2⁢t+C and A=Be−0.2⁢t. At t=0, A=B=50. Setting 50e−0.2⁢t=10 gives e−0.2⁢t=1⁢/5, so t=5ln5≈8.05 hours. The row 50e−0.2⁢t=10 reads • “New condition: A(t) = 10.” and the rows after it read ✓.

d⁢Ad⁢t=−0.2⁢AA⁢(0)=50d⁢AA=−0.2d⁢tln∣⁢A⁢∣=−0.2⁢t+CA=Be−0.2⁢tA=50e−0.2⁢t50e−0.2⁢t=10e−0.2⁢t=15t=5ln5t≈8.05

Keep exploring

Check the derivative in Math: under y=3ex2, the row y′=6⁢xex2 reads ✓, and 6⁢xex2 is 2⁢x⁢y.

Return to the concept →
Sources and scope

Authored study material. Tool results depend on the stated inputs and model assumptions.

After reading

Try it, then study it

Open the example in its tool to check steps or change values, then review the key terms as flashcards.

Solve it step by step in Math Check the derivative in Math Graph the solution Follow the solution in Slope Fields and Euler’s Method Study the 6 key terms Open worked example on a board Integral of 1⁢/⁢x in Math Reference

Your existing work stays on this device. Examples open as editable copies.