Calculus · real student question

A function y = f(x) satisfies the differential equation dy/dx = 3x^2 (y - 4). If f(0) = 6, find the particular solution.

Question

A function y=f(x)y=f(x) satisfies the differential equation

dydx=3x2(y4)\frac{dy}{dx}=3x^{2}(y-4)

with the initial condition f(0)=6f(0)=6. Find the particular solution.

Step-by-step solution

  1. Spot that the equation is separable and check the special solution. The right-hand side is a function of xx times a function of yy, so the variables can be split. Before dividing, note that y=4y=4 makes the right side zero and is itself a constant solution; the initial value f(0)=64f(0)=6\neq 4 tells us our solution is not that one, so dividing by y4y-4 is legitimate near the initial point.

  2. Separate the variables. Move all yy to the left and all xx to the right:

    1y4dy=3x2dx\frac{1}{y-4}\,dy=3x^{2}\,dx

  3. Integrate both sides. The left is a logarithm, the right a power:

    1y4dy=3x2dx  lny4=x3+C\int\frac{1}{y-4}\,dy=\int 3x^{2}\,dx\ \Longrightarrow\ \ln|y-4|=x^{3}+C

    Only one constant is needed because the two sides' constants can be merged.

  4. Exponentiate to solve for yy. Applying e()e^{(\cdot)} to both sides,

    y4=ex3+C=eCex3|y-4|=e^{x^{3}+C}=e^{C}e^{x^{3}}

    Since eCe^{C} is an arbitrary positive constant and the sign of y4y-4 is absorbed by allowing the constant to be negative, write

    y4=Kex3  y=4+Kex3y-4=Ke^{x^{3}}\ \Longrightarrow\ y=4+Ke^{x^{3}}

    with KK any real constant (K=0K=0 recovers the special solution y=4y=4).

  5. Apply the initial condition. Substituting x=0x=0, y=6y=6 and using e0=1e^{0}=1:

    6=4+K1  K=26=4+K\cdot 1\ \Longrightarrow\ K=2

    So the particular solution is

    y=4+2ex3y=4+2e^{x^{3}}

  6. Verify the solution satisfies both requirements. Differentiating, dydx=23x2ex3=6x2ex3\dfrac{dy}{dx}=2\cdot 3x^{2}e^{x^{3}}=6x^{2}e^{x^{3}}, while 3x2(y4)=3x22ex3=6x2ex33x^{2}(y-4)=3x^{2}\cdot 2e^{x^{3}}=6x^{2}e^{x^{3}} — identical. A central-difference check at x=0.5x=0.5, 1.11.1 and 0.8-0.8 matches 3x2(y4)3x^{2}(y-4) to five decimal places, and y(0)=4+2=6y(0)=4+2=6 as required.

Answer

y=4+2ex3y=4+2e^{x^{3}}

Need to solve a different problem like this? Open the solver →