# Differential Equation Solver > Solve first-order and second-order ODEs (separable, linear, exact, Bernoulli) with step-by-step methods **Category:** Math **Keywords:** differential equation, ODE, separable, linear, exact, Bernoulli, second order, initial value problem, integrating factor, characteristic equation, calculus, mathematics **URL:** https://complete.tools/differential-equation-solver ## First-Order ODEs First-order ODEs involve only the first derivative of the unknown function. There are several important types, each with its own solution method. **Separable Equations** A separable ODE can be written as dy/dx = f(x) * g(y), meaning the variables can be separated onto opposite sides of the equation. The solution method involves dividing both sides by g(y) and integrating: ``` (1/g(y)) dy = f(x) dx Integrate both sides Solve for y ``` Example: dy/dx = x*y separates to (1/y) dy = x dx, giving ln|y| = x²/2 + C, so y = Ae^(x²/2). **Linear First-Order Equations** A linear first-order ODE has the form dy/dx + P(x)*y = Q(x). The solution uses an integrating factor μ(x) = e^(∫P(x)dx): ``` Multiply both sides by μ(x) Left side becomes d/dx[μ(x)*y] Integrate both sides Solve for y ``` **Exact Equations** An ODE M(x,y)dx + N(x,y)dy = 0 is exact when ∂M/∂y = ∂N/∂x. The solution is a function F(x,y) = C where ∂F/∂x = M and ∂F/∂y = N. **Bernoulli Equations** A Bernoulli equation has the form dy/dx + P(x)*y = Q(x)*y^n. A substitution v = y^(1-n) transforms it into a linear equation that can be solved with an integrating factor. ## Second-Order Linear ODEs Second-order ODEs involve the second derivative y'' and are common in physics and engineering, modeling oscillations, beam deflection, and electrical circuits. **Homogeneous Equations: ay'' + by' + cy = 0** The solution method uses the characteristic equation ar² + br + c = 0. The nature of the roots determines the solution form: - Two distinct real roots r₁ and r₂: y = C₁e^(r₁x) + C₂e^(r₂x) - Repeated real root r: y = (C₁ + C₂x)e^(rx) - Complex conjugate roots α ± βi: y = e^(αx)(C₁cos(βx) + C₂sin(βx)) **Non-Homogeneous Equations: ay'' + by' + cy = g(x)** The general solution combines the homogeneous solution y_h with a particular solution y_p: y = y_h + y_p. Finding y_p uses the method of undetermined coefficients (when g(x) is a polynomial, exponential, or sine/cosine) or variation of parameters (for more general g(x)). ## Initial Value Problems An initial value problem (IVP) pairs a differential equation with specific conditions at a particular point, allowing you to find the unique particular solution from the family of general solutions. For a first-order ODE, one initial condition is needed: y(x₀) = y₀. For a second-order ODE, two conditions are needed: y(x₀) = y₀ and y'(x₀) = y₁. The process is straightforward: 1. Solve the ODE to get the general solution with arbitrary constants C₁, C₂, etc. 2. Substitute the initial conditions to create a system of equations. 3. Solve for the constants. 4. Write the particular solution with the constants filled in. Initial conditions have physical meaning: in a spring-mass system, y(0) represents the initial displacement and y'(0) represents the initial velocity. ## How to Use 1. Type your differential equation in standard notation (e.g., dy/dx = y*x, y'' + 2y' + y = 0, or dy/dx + y = e^x). 2. Select the ODE type from the dropdown, or leave it on Auto-detect to let the AI identify it. 3. Optionally enter initial conditions if you want a particular solution (e.g., y(0) = 1). 4. Click "Solve ODE" and wait 10-30 seconds for the AI to work through the problem. 5. Review the general solution, particular solution (if applicable), and step-by-step work. ## FAQs **Q:** What types of differential equations can this tool solve? **A:** The tool handles first-order ODEs (separable, linear, exact, Bernoulli) and second-order linear ODEs (both homogeneous and non-homogeneous with common right-hand sides). It uses AI to identify the type and apply the appropriate method. **Q:** What notation should I use when entering my equation? **A:** Use standard mathematical notation: dy/dx or y' for the first derivative, y'' or d²y/dx² for the second. Multiplication can be written as y*x or just yx. The AI understands common mathematical shorthand. **Q:** Why do general solutions contain constants like C or C₁ and C₂? **A:** A differential equation has infinitely many solutions, differing only in these arbitrary constants. Each choice of constant gives one solution curve. Providing initial conditions pins down the constants to give the unique solution that passes through your specified point. **Q:** What is an integrating factor and when is it used? **A:** An integrating factor is a function multiplied on both sides of a linear first-order ODE to make the left side a perfect derivative. It turns the equation into one that can be solved by direct integration. The integrating factor for dy/dx + P(x)y = Q(x) is e^(∫P(x)dx). **Q:** What is the characteristic equation? **A:** The characteristic equation is an algebraic equation derived from a constant-coefficient linear ODE by substituting y = e^(rx). For ay'' + by' + cy = 0, it becomes ar² + br + c = 0. The roots of this equation determine the form of the general solution. **Q:** Can this tool handle systems of differential equations? **A:** The tool is optimized for single ODEs. Systems of ODEs (multiple equations with multiple unknowns) require matrix methods and are beyond its current scope. **Q:** How accurate are the AI-generated solutions? **A:** The AI draws on a deep knowledge of differential equation theory and provides correct solutions for standard equation types. For critical academic or engineering work, always verify results by substituting the solution back into the original equation. --- *Generated from [complete.tools/differential-equation-solver](https://complete.tools/differential-equation-solver)*