Simplify Your Workflow: Search MiniWebtool.
Add Extension
See also
Second-Order ODE SolverBernoulli ODE SolverSystem of ODEs SolverRunge-Kutta (RK4) Method CalculatorEuler's Method CalculatorDirection Field / Slope Field PlotterForward Rate Calculator
Home Page > Math > Calculus > First-Order ODE Solver

First-Order ODE Solver

Solve first-order ordinary differential equations symbolically and numerically. Auto-detects separable, linear, exact, and autonomous forms, applies the right technique, and renders an interactive slope field with the solution curve overlaid.

First-Order ODE Solver
dy/dx =
Use x, y as variables. Operators: + - * / ^ **. Functions: sin, cos, tan, exp, log, sqrt, abs. Constants: pi, e.
xโ‚€
yโ‚€
x min
x max
Initial condition y(xโ‚€) = yโ‚€. The solver integrates outward from xโ‚€ in both directions to fill the range.

Embed First-Order ODE Solver Widget

About First-Order ODE Solver

The First-Order ODE Solver takes an ordinary differential equation in the form dy/dx = f(x, y), automatically classifies its structure (separable, linear, autonomous, exact, or general), and produces both a symbolic closed-form solution where possible and a high-accuracy numerical solution everywhere. A live slope-field visualization with the solution curve overlaid makes the geometric meaning of the equation immediately obvious โ€” solutions are exactly the curves tangent to every arrow.

What Is a First-Order ODE?

A first-order ordinary differential equation involves an unknown function y(x) and its first derivative y'(x) only. The standard explicit form is:

dy/dx = f(x, y)

Combined with an initial condition y(xโ‚€) = yโ‚€, this defines an initial-value problem (IVP). The Picard-Lindelรถf theorem guarantees a unique solution in some neighborhood of xโ‚€ as long as f is Lipschitz continuous in y near (xโ‚€, yโ‚€). Geometrically, the IVP asks for the unique curve passing through (xโ‚€, yโ‚€) whose slope at every point matches f at that point โ€” exactly the curve tangent to the slope field.

Six Classes the Solver Recognizes

Class Form Standard solving technique What this tool does
Pure integration dy/dx = f(x) Direct integration: y = โˆซf(x) dx + C Numerical integration (RK4 reduces to Simpson-like quadrature)
Linear (constant coeffs) dy/dx = aยทy + b Closed form via integrating factor or characteristic root Full symbolic answer + step-by-step derivation
Autonomous dy/dx = f(y) Separation: โˆซdy/f(y) = x + C Numerical solution + slope-field visualization
Separable dy/dx = g(x)ยทh(y) Separation: โˆซdy/h(y) = โˆซg(x) dx + C Form detected via cross-product test; numerical solution shown
Linear (variable coeffs) dy/dx + P(x)ยทy = Q(x) Integrating factor ฮผ(x) = e^โˆซP(x) dx Form detected via finite-difference linearity test; numerical solution shown
General Any other dy/dx = f(x, y) Numerical methods (RK4, RK45, BDF, โ€ฆ) Classical Runge-Kutta with 600 sub-steps

Closed-Form Method: Linear With Constant Coefficients

When the right-hand side simplifies to dy/dx = aยทy + b with constants a and b, the integrating factor ฮผ(x) = e^(-aยทx) gives an exact solution. The general solution is:

y(x) = -b/a + C ยท e^(aยทx) (a โ‰  0) y(x) = bยทx + C (a = 0)

Applying the initial condition y(xโ‚€) = yโ‚€ pins down the constant C and yields the unique particular solution. This single class covers an enormous number of textbook problems:

Reading a Slope Field

At every grid point (x, y) the tool draws a short line segment whose slope equals f(x, y). Three useful observations:

Numerical Method: Classical Runge-Kutta (RK4)

Given (x_n, y_n), the next value is computed by averaging four slope estimates:

kโ‚ = f(x_n, y_n) kโ‚‚ = f(x_n + h/2, y_n + hยทkโ‚/2) kโ‚ƒ = f(x_n + h/2, y_n + hยทkโ‚‚/2) kโ‚„ = f(x_n + h, y_n + hยทkโ‚ƒ) y_{n+1} = y_n + (h/6) ยท (kโ‚ + 2kโ‚‚ + 2kโ‚ƒ + kโ‚„)

RK4 has local truncation error O(hโต) and global error O(hโด), giving roughly six-digit accuracy at the default step count for non-stiff equations. The solver integrates outward from the initial point in both x-directions and stops cleanly if the magnitude of y exceeds 10ยนโต โ€” typical for solutions that blow up in finite time, like dy/dx = yยฒ.

How to Use This Calculator

  1. Enter the right-hand side in the dy/dx = ... field. Use x and y as variables, * for multiplication, ^ or ** for powers, and standard functions like sin, cos, exp, log, sqrt. Constants pi and e are recognized.
  2. Specify the initial condition (xโ‚€, yโ‚€) โ€” the unique solution curve will pass through this point.
  3. Pick the x range over which to plot the slope field and the solution curve. The y range is auto-fit from the integrated solution.
  4. Click Solve & Visualize. The classifier runs first; if your equation matches a closed-form pattern (linear with constant coefficients), you get the symbolic answer. The slope field and solution curve are always rendered.
  5. Toggle the slope field on or off to focus on the solution curve, or replay the curve-drawing animation to see how integration progresses from the initial point.

Worked Example: Newton's Law of Cooling

A cup of coffee at 80 ยฐC cools in a 20 ยฐC room. The heat-transfer rate is proportional to the temperature difference:

dT/dt = -0.1 ยท (T - 20), T(0) = 80

This is linear with constant coefficients (a = -0.1, b = 2). The closed form is:

T(t) = 20 + 60 ยท e^(-0.1 t)

After 30 minutes: T(30) = 20 + 60ยทeโปยณ โ‰ˆ 22.99 ยฐC. The slope-field view makes the limiting behavior obvious โ€” every solution curve, regardless of starting temperature, asymptotes to the horizontal line T = 20.

Common Applications

Frequently Asked Questions

What is a first-order ordinary differential equation?

A first-order ordinary differential equation (ODE) is an equation of the form dy/dx = f(x, y) that involves the unknown function y(x) and its first derivative. Solving the ODE means finding the function y(x) whose derivative matches the right-hand side. With an initial condition y(xโ‚€) = yโ‚€ the solution is unique under mild regularity assumptions (Picard-Lindelรถf theorem).

What is a slope field?

A slope field (or direction field) plots a small line segment at each grid point (x, y) whose slope equals f(x, y). Solution curves of the ODE are exactly the curves that are tangent to these segments at every point. The slope field gives instant visual intuition for the global behavior of solutions without solving the equation symbolically.

Which classes of first-order ODEs does this tool solve?

The tool auto-classifies the equation into one of: integrable (depends only on x, solved by direct integration), linear with constant coefficients y' = aยทy + b (full closed-form provided), autonomous (depends only on y), separable (factors as g(x)ยทh(y)), linear with variable coefficients (P(x)ยทy + Q(x)), or general. For every class, a high-accuracy Runge-Kutta numerical solution and slope-field visualization are produced.

What numerical method is used?

The classical fourth-order Runge-Kutta method (RK4) is applied with 300 sub-steps in each direction from the initial point. RK4 has local truncation error O(hโต) and is the standard workhorse for non-stiff ODEs at this scale. The solver detects divergence (overflow or NaN) and stops integration cleanly so the plot remains valid.

What is the integrating-factor method for linear ODEs?

For a linear first-order ODE y' + P(x)ยทy = Q(x), multiply both sides by the integrating factor ฮผ(x) = e^โˆซP(x) dx. The left side becomes the exact derivative d/dx[ฮผยทy], so y(x) = (1/ฮผ(x)) ยท (โˆซฮผ(x)ยทQ(x) dx + C). When P and Q are constants this collapses to the closed form y = -b/a + Cยทe^(aยทx), which the tool returns automatically.

Can this tool handle stiff equations or systems of ODEs?

This solver is intended for non-stiff first-order scalar ODEs. Very stiff problems (where the solution has multiple time scales differing by many orders of magnitude) may need an implicit method like backward Euler or Rosenbrock; coupled systems require a vector-valued solver. For those cases use a dedicated package such as SciPy's solve_ivp or specialized stiff-ODE solvers.

Further Reading

Reference this content, page, or tool as:

"First-Order ODE Solver" at https://MiniWebtool.com/first-order-ode-solver/ from MiniWebtool, https://MiniWebtool.com/

by miniwebtool team. Updated: Apr 22, 2026

You can also try our AI Math Solver GPT to solve your math problems through natural language question and answer.

Calculus:

Top & Updated:

Instagram User ID LookupRandom PickerRandom Name Picker WheelImage ResizerFacebook User ID LookupLine CounterRSD Calculator - Relative Standard DeviationSort NumbersFPS ConverterMAC Address GeneratorRemove SpacesWord to Phone Number ConverterSun, Moon & Rising Sign Calculator ๐ŸŒž๐ŸŒ™โœจ๐Ÿ“ท OCR / Image to Textโฌ› Aspect Ratio CalculatorRandom Quote GeneratorERA CalculatorMAC Address Lookup๐Ÿ–ฑ๏ธ Click CounterSquare Root (โˆš) CalculatorMerge VideosSlope and Grade CalculatorJob FinderPercent Off CalculatorSum CalculatorWeight Loss CalculatorSHA256 Hash GeneratorBatting Average CalculatorCm to Feet and Inches ConverterRandom Truth or Dare GeneratorMP3 LooperRandom Poker Hand GeneratorAdd Text to ImageVertical Jump CalculatorRandom Credit Card GeneratorRoman Numerals ConverterNumber of Digits CalculatorAudio SplitterRandom Fake Address GeneratorRandom IMEI GeneratorLog Base 10 CalculatorInvisible Text GeneratorFeet and Inches to Cm ConverterRandom Birthday GeneratorPhone Number ExtractorBitwise CalculatorJulian Date ConverterImage SplitterRandom Superpower GeneratorRandom Writing Prompt GeneratorSalary Conversion CalculatorNumber to Word ConverterSun Position CalculatorName RandomizerText FormatterLunar Calendar ConverterRandom Activity GeneratorCaffeine Overdose CalculatorIP Subnet CalculatorOctal CalculatorHalfway Date CalculatorBCD ConvertereBay Fee CalculatorCompound Growth CalculatorRandom Movie PickerBolt Torque CalculatorLong Division CalculatorFile Size ConverterBinary to Gray Code ConverterImage CompressorYouTube Channel StatisticsWord Ladder GeneratorQuotient and Remainder CalculatorEmail ExtractorStair CalculatorSHA512 Hash GeneratorOutlier CalculatorRandom Meal GeneratorVideo CompressorHebrew Calendar ConverterLeap Years ListFirst n Digits of PiOPS CalculatorBCD to Decimal ConverterWAR CalculatorRandom Loadout GeneratorBreak Line by CharactersList of Prime NumbersMultiplication CalculatorStandard Error CalculatorBcrypt Hash Generator / Checker๐Ÿ“… Date CalculatorSlugging Percentage Calculator๐Ÿ” Plagiarism CheckerAPI TesterMD5 Hash GeneratorRandomize NumbersAI Language DetectorURL ExtractorFlip VideoDMS to Decimal Degrees ConverterMaster Number CalculatorBroken Link CheckerCompare Two StringsMultiple Fraction CalculatorRandom Number Picker๐ŸŽฐ Gacha Pity CalculatorAstrological Element Balance Calculator๐Ÿ”Š Tone GeneratorArc Length CalculatorVideo to Image ExtractorEstimation CalculatorIP Address to Hex ConverterWhat is my Zodiac Sign?Add Prefix and Suffix to TextIs it a Prime Number?Percent to PPM ConverterRandom Emoji GeneratorRemove AccentSocial Media Username CheckerBingo Card GeneratorNumber ExtractorOn Base Percentage CalculatorPercent Growth Rate CalculatorRandom Tournament Bracket GeneratorTime Duration CalculatorDay of the Year Calculator - What Day of the Year Is It Today?Cone Flat Pattern (Template) GeneratorLottery Number GeneratorName Number CalculatorAcreage CalculatorBattery Life CalculatorDay of Year CalendarLED Resistor CalculatorModulo CalculatorRatio CalculatorList RandomizerSocial Media Post Time OptimizerGray Code to Binary ConverterRandom Math Problem GeneratorRandom User-Agent GeneratorVideo SplitterRatio to Percentage CalculatorYouTube Tag ExtractorRandom Chord GeneratorSmall Text Generator โฝแถœแต’แต–สธ โฟ แต–แตƒหขแต—แต‰โพWord Scramble GeneratorIP Address to Binary ConverterChinese Gender PredictorDecibel (dB) CalculatorRandom Video Thumbnail GeneratorSquare Numbers ListConnect the Dots GeneratorMercury Retrograde CalendarImage CropperSaturn Return CalculatorFraction CalculatorRemove Line BreaksProportion CalculatorOrder of Operations Calculator (PEMDAS)Random PIN GeneratorScientific Notation to Decimal ConverterRandom Line PickerMagic 8-Ball๐Ÿ“Š Bar Graph MakerLove Compatibility CalculatorText Case ConverterColor InverterAdjust Video SpeedFirst n Digits of eWhat is my Lucky Number?Random Excuse GeneratorBinary to BCD Converter๐Ÿ’ง Dew Point CalculatorImage EnhancerRadical SimplifierTaco Bar CalculatorLbs to Kg ConverterPER CalculatorTrigonometric Equation SolverPregnancy CalendarReverse VideoHeight Percentile CalculatorBackronym GeneratorMcg to Mg ConverterPaycheck Calculator (Take-Home Pay)Random Object GeneratorWHIP CalculatorAmortization CalculatorGolden Ratio CalculatorAngel Number CalculatorInvisible Character RemoverWhitespace VisualizerAI Text HumanizerCrossword Puzzle MakerHTML CompressorParabola CalculatorRandom Chess Opening GeneratorAI ParaphraserAI Punctuation AdderSort Lines AlphabeticallyHex to BCD ConverterBCD to Binary ConverterBCD to Hex ConverterMedian CalculatorAverage CalculatorPVIFA CalculatorHypotenuse CalculatorRemove Audio from VideoActual Cash Value CalculatorLog Base 2 CalculatorRoot Mean Square CalculatorSum of Positive Integers CalculatorSHA3-256 Hash GeneratorAI Sentence ExpanderHex to Decimal ConverterRandom Group GeneratorConvolution CalculatorMAC Address AnalyzerRandom String GeneratorRemove Leading Trailing SpacesMarkup CalculatorPVIF CalculatorDecimal to Hex ConverterInstagram Font GeneratorSocial Media Image Size GuideTikTok Money CalculatorTwitter/X Character CounterTwitter/X Timestamp ConverterYouTube Watch Time CalculatorTwitch Earnings CalculatorYouTube Shorts Monetization CalculatorFacebook Ad Cost CalculatorSocial Media ROI CalculatorCTR CalculatorROAS CalculatorInfluencer ROI CalculatorForce CalculatorAcceleration CalculatorVelocity CalculatorMomentum CalculatorProjectile Motion CalculatorKinetic Energy CalculatorPotential Energy CalculatorWork and Power CalculatorDensity CalculatorPressure CalculatorIdeal Gas Law CalculatorFree Fall CalculatorTorque CalculatorHorsepower CalculatorDilution CalculatorChemical Equation BalancerStoichiometry CalculatorPercent Yield CalculatorEmpirical Formula CalculatorBoiling Point CalculatorTitration CalculatorMole/Gram/Particle ConverterIrregular Polygon Area CalculatorFrustum CalculatorTorus Calculator3D Distance CalculatorGreat Circle Distance CalculatorCircumscribed Circle (Circumcircle) CalculatorInscribed Circle (Incircle) CalculatorAngle Bisector CalculatorTangent Line to Circle CalculatorHeron's Formula CalculatorCoordinate Geometry Distance CalculatorVolume of Revolution CalculatorSurface of Revolution CalculatorParametric Curve GrapherRiemann Sum CalculatorTrapezoidal Rule CalculatorSimpson's Rule CalculatorImproper Integral CalculatorL'Hรดpital's Rule CalculatorMaclaurin Series CalculatorPower Series CalculatorSeries Convergence Test CalculatorInfinite Series Sum CalculatorAverage Rate of Change CalculatorInstantaneous Rate of Change CalculatorRelated Rates SolverOptimization Calculator (Calculus)Gradient Calculator (Multivariable)Divergence CalculatorCurl CalculatorLine Integral CalculatorSurface Integral CalculatorJacobian Matrix CalculatorNewton's Method CalculatorRREF Calculator (Row Echelon Form)Matrix Inverse CalculatorMatrix Multiplication CalculatorDot Product CalculatorCross Product CalculatorVector Magnitude CalculatorUnit Vector CalculatorAngle Between Vectors CalculatorNull Space CalculatorColumn Space CalculatorCramer's Rule CalculatorMatrix Diagonalization CalculatorQR Decomposition CalculatorCholesky Decomposition CalculatorMatrix Power CalculatorCharacteristic Polynomial CalculatorBayes' Theorem CalculatorF-Test / F-Distribution CalculatorHypergeometric Distribution CalculatorNegative Binomial Distribution CalculatorGeometric Distribution CalculatorExponential Distribution CalculatorWeibull Distribution CalculatorBeta Distribution CalculatorSpearman Rank Correlation CalculatorFisher's Exact Test CalculatorContingency Table CalculatorOdds Ratio CalculatorBernoulli Equation CalculatorSurfboard Volume CalculatorTennis Grip Size CalculatorBackpack Size CalculatorCelsius to Fahrenheit ConverterFahrenheit to Celsius ConverterKm to Miles ConverterMiles to Km ConverterMM to Inches ConverterInches to MM ConverterStone to Kg ConverterKg to Stone ConverterLiters to Gallons ConverterGallons to Liters ConverterML to Oz ConverterOz to ML ConverterSquare Meters to Square Feet ConverterSquare Feet to Square Meters ConverterCubic Feet to Cubic Yards ConverterCubic Meters to Cubic FeetKnots to MPH ConverterMPH to KMH / KMH to MPHMg to Ml ConverterAI Text SummarizerAI TranslatorAI Story GeneratorAI Poem GeneratorAI Song Lyrics GeneratorIndian Land Unit ConverterTola to Gram ConverterPX to REM ConverterPT to PX ConverterMerge PDFSplit PDFCompress PDFPDF to JPGJPG to PDFRotate PDFDelete PDF PagesAdd Page Numbers to PDFProtect PDFReorder PDF PagesPDF Word CounterPDF Page ExtractorPDF to Text ExtractorUnlock PDF (Owner-Password Removal)PDF Flatten ToolAI Rap Lyrics GeneratorAI Cover Letter GeneratorAI Resume Bullet GeneratorAI LinkedIn Headline & Bio GeneratorAI Instagram Caption GeneratorAI YouTube Title & Description GeneratorAI Video Script GeneratorAI Product Description GeneratorAI Press Release GeneratorAI Wedding Speech GeneratorAI Thank-You Note GeneratorAI Dream InterpreterRandom Question GeneratorWould You Rather GeneratorNever Have I Ever GeneratorIcebreaker Question GeneratorCharades GeneratorPictionary Word GeneratorHangman Word GeneratorTrivia Question GeneratorRandom Fact GeneratorRandom Joke GeneratorDad Joke GeneratorPickup Line GeneratorCompliment GeneratorDaily Affirmation GeneratorJournal Prompt GeneratorDrawing Idea GeneratorFortune Cookie GeneratorFantasy Name GeneratorCapacitor Bank Sizing CalculatorSolar Charge Controller Sizing CalculatorBattery C-Rate CalculatorBattery Internal Resistance CalculatorPeukert Battery Runtime CalculatorWire Resistance CalculatorPCB Via Current CalculatorBand Name GeneratorRap Name GeneratorNickname GeneratorTeam Name GeneratorGamertag Generator