Math Problem Statement

Find the general solution to the first-order ordinary differential equation: dy/dx + y = x^2

Solution

The given first-order ordinary differential equation is:

dydx+y=x2\frac{dy}{dx} + y = x^2

This is a linear first-order differential equation, which can be solved using an integrating factor. The general form of a first-order linear ODE is:

dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x)y = Q(x)

In this case, P(x)=1P(x) = 1 and Q(x)=x2Q(x) = x^2.

Step 1: Find the integrating factor

The integrating factor μ(x)\mu(x) is given by:

μ(x)=eP(x)dx=e1dx=ex\mu(x) = e^{\int P(x) \, dx} = e^{\int 1 \, dx} = e^x

Step 2: Multiply the entire equation by the integrating factor

We multiply both sides of the differential equation by exe^x:

exdydx+exy=exx2e^x \frac{dy}{dx} + e^x y = e^x x^2

This simplifies to:

ddx(exy)=exx2\frac{d}{dx} \left( e^x y \right) = e^x x^2

Step 3: Integrate both sides

Now, we integrate both sides with respect to xx:

exy=exx2dxe^x y = \int e^x x^2 \, dx

To integrate exx2e^x x^2, we use integration by parts. Let’s break it down:

  • First, set u=x2u = x^2, so du=2xdxdu = 2x \, dx.
  • Let dv=exdxdv = e^x \, dx, so v=exv = e^x.

Applying integration by parts:

x2exdx=x2ex2xexdx\int x^2 e^x \, dx = x^2 e^x - \int 2x e^x \, dx

Now, apply integration by parts again to the remaining integral 2xexdx\int 2x e^x \, dx. Let:

  • u=xu = x, so du=dxdu = dx,
  • dv=exdxdv = e^x \, dx, so v=exv = e^x.

This gives:

2xexdx=2(xexexdx)=2(xexex)\int 2x e^x \, dx = 2(x e^x - \int e^x \, dx) = 2(x e^x - e^x)

Thus,

x2exdx=x2ex2(xexex)=ex(x22x+2)\int x^2 e^x \, dx = x^2 e^x - 2(x e^x - e^x) = e^x (x^2 - 2x + 2)

Step 4: Solve for yy

Now, substitute this back into the original equation:

exy=ex(x22x+2)+Ce^x y = e^x (x^2 - 2x + 2) + C

Divide by exe^x to isolate yy:

y=x22x+2+Cexy = x^2 - 2x + 2 + C e^{-x}

General Solution:

The general solution to the differential equation is:

y=x22x+2+Cexy = x^2 - 2x + 2 + C e^{-x}

Would you like any more details or clarification on this solution?

Here are 5 related questions to explore further:

  1. How is an integrating factor used in solving linear differential equations?
  2. Can the integrating factor method be used for non-linear equations?
  3. What are the conditions under which a first-order differential equation has a unique solution?
  4. How does integration by parts work, and when is it necessary in solving ODEs?
  5. What is the role of the constant CC in the general solution of a differential equation?

Tip: Always check whether a differential equation is exact or can be made exact before proceeding with solution techniques. This can simplify the process!

Ask a new question for Free

By Image

Drop file here or Click Here to upload

Math Problem Analysis

Mathematical Concepts

First-order linear differential equations
Integrating factor
Integration by parts

Formulas

dy/dx + P(x)y = Q(x)
Integrating factor: μ(x) = e^∫P(x)dx

Theorems

Linear differential equation theorem
Integration by parts

Suitable Grade Level

Undergraduate Calculus