First-Order ODE Solver Calculator

Published on: July 18, 2026
Final Answer: Free Full Steps: Pro

This First-Order ODE Solver solves first-order differential equations such as y' + 2y = e^(-x) or dy/dx = y/x. It classifies the equation (separable, linear, and so on), integrates, and gives the general solution with the constant C1.

Step-by-step method

  1. Write the differential equation clearly.
  2. Identify the first-order type (separable, linear, and so on).
  3. Integrate to get the general solution with C1.
  4. Write the general solution y(x).

Formula:

\(\frac{dy}{dx} + P(x)\, y = Q(x) \;\Rightarrow\; \mu = e^{\int P \, dx}\)

Example 1:

\\(2 y{\left(x \right)} + \frac{d}{d x} y{\left(x \right)} = e^{- x}\\)

Step 1 - Write the differential equation clearly.

In this problem: We are solving \(2 y{\left(x \right)} + \frac{d}{d x} y{\left(x \right)} = e^{- x}\).

\(2 y{\left(x \right)} + \frac{d}{d x} y{\left(x \right)} = e^{- x}\)

Step 2 - Identify the first-order type (separable, linear, and so on).

In this problem: This equation is exact.

\(\frac{dy}{dx} + P(x)\, y = Q(x) \;\Rightarrow\; \mu = e^{\int P \, dx}\)

Step 3 - Integrate to get the general solution with C1.

In this problem: Integrating both sides introduces the constant C1.

\(y = \left(C_{1} + e^{x}\right) e^{- 2 x}\)

Step 4 - Write the general solution y(x).

In this problem: The general solution is \(y = \left(C_{1} + e^{x}\right) e^{- 2 x}\).

\(y = \left(C_{1} + e^{x}\right) e^{- 2 x}\)

Final answer:

\\(y = \left(C_{1} + e^{x}\right) e^{- 2 x}\\)

Example 2:

\\(\frac{d}{d x} y{\left(x \right)} = \frac{y{\left(x \right)}}{x}\\)

Step 1 - Write the differential equation clearly.

In this problem: We are solving \(\frac{d}{d x} y{\left(x \right)} = \frac{y{\left(x \right)}}{x}\).

\(\frac{d}{d x} y{\left(x \right)} = \frac{y{\left(x \right)}}{x}\)

Step 2 - Identify the first-order type (separable, linear, and so on).

In this problem: This equation is separable.

\(\frac{dy}{dx} + P(x)\, y = Q(x) \;\Rightarrow\; \mu = e^{\int P \, dx}\)

Step 3 - Integrate to get the general solution with C1.

In this problem: Integrating both sides introduces the constant C1.

\(y = C_{1} x\)

Step 4 - Write the general solution y(x).

In this problem: The general solution is \(y = C_{1} x\).

\(y = C_{1} x\)

Final answer:

\\(y = C_{1} x\\)
See Example 1 Hide Example 1

Problem

\(2 y{\left(x \right)} + \frac{d}{d x} y{\left(x \right)} = e^{- x}\)

Approach

Step-by-step method

  1. Write the differential equation clearly.
  2. Identify the first-order type (separable, linear, and so on).
  3. Integrate to get the general solution with C1.
  4. Write the general solution y(x).

Step 1

Step 1 - Write the differential equation clearly.

In this problem:

\(2 y{\left(x \right)} + \frac{d}{d x} y{\left(x \right)} = e^{- x}\)

Step 2

Step 2 - Identify the first-order type (separable, linear, and so on).

In this problem:

\(\frac{dy}{dx} + P(x)\, y = Q(x) \;\Rightarrow\; \mu = e^{\int P \, dx}\)

Step 3

Step 3 - Integrate to get the general solution with C1.

In this problem:

\(y = \left(C_{1} + e^{x}\right) e^{- 2 x}\)

Step 4

Step 4 - Write the general solution y(x).

In this problem:

\(y = \left(C_{1} + e^{x}\right) e^{- 2 x}\)

Final Answer

\(y = \left(C_{1} + e^{x}\right) e^{- 2 x}\)
See Example 2 Hide Example 2

Problem

\(\frac{d}{d x} y{\left(x \right)} = \frac{y{\left(x \right)}}{x}\)

Approach

Step-by-step method

  1. Write the differential equation clearly.
  2. Identify the first-order type (separable, linear, and so on).
  3. Integrate to get the general solution with C1.
  4. Write the general solution y(x).

Step 1

Step 1 - Write the differential equation clearly.

In this problem:

\(\frac{d}{d x} y{\left(x \right)} = \frac{y{\left(x \right)}}{x}\)

Step 2

Step 2 - Identify the first-order type (separable, linear, and so on).

In this problem:

\(\frac{dy}{dx} + P(x)\, y = Q(x) \;\Rightarrow\; \mu = e^{\int P \, dx}\)

Step 3

Step 3 - Integrate to get the general solution with C1.

In this problem:

\(y = C_{1} x\)

Step 4

Step 4 - Write the general solution y(x).

In this problem:

\(y = C_{1} x\)

Final Answer

\(y = C_{1} x\)