ODEMedium

Differential equation — separable variables

Solve the differential equation y' = 2x·y with initial condition y(0) = 3.
Given data
y' = 2x·yy(0) = 3
Review the theory: ODE
Steps
0 / 4
  1. Separate the variables: move y to the left and x to the right.
  2. Integrate both sides: ∫ dy/y = ∫ 2x dx.
  3. Apply the exponential to isolate y.
  4. Use the condition y(0) = 3 to find K.
Full worked solution
  1. Separate the variables: move y to the left and x to the right.
    dyy=2x dx\dfrac{dy}{y} = 2x\,dx
    dydx=2xy→dyy=2x dx\frac{dy}{dx} = 2xy \rightarrow \frac{dy}{y} = 2x\,dx. Separating variables puts all yy terms on the left and all xx terms on the right.
  2. Integrate both sides: ∫ dy/y = ∫ 2x dx.
    ln⁡∣y∣=x2+C\ln|y| = x^2 + C
    ∫dyy=∫2x dx→ln⁡∣y∣=x2+C\int \frac{dy}{y} = \int 2x\,dx \rightarrow \ln|y| = x^2 + C. Integrating both sides yields the general solution in implicit form.
  3. Apply the exponential to isolate y.
    ∣y∣=ex2+C=eC⋅ex2|y| = e^{x^2 + C} = e^C \cdot e^{x^2}
    ∣y∣=ex2+C=eC ex2→y=K ex2|y| = e^{x^2 + C} = e^C\,e^{x^2} \rightarrow y = K\,e^{x^2} with K=±eCK = \pm e^C. Exponentiating both sides removes the logarithm.
  4. Use the condition y(0) = 3 to find K.
    y(0)=K⋅e0=K=3y(0) = K \cdot e^0 = K = 3
    3=K e0=K3 = K\,e^{0} = K, so K=3\mathbf{K = 3}. The particular solution satisfying the initial condition is y(x)=3 ex2\mathbf{y(x) = 3\,e^{x^2}}.
Result:y(x) = 3·e^{x²}.