Transcript text: (d) $\frac{d x}{d t}=2 t x+4 e^{-t^{2}}, x(0)=10$.
Solution
Solution Steps
To solve the given differential equation, we can use numerical methods such as the Runge-Kutta method. The equation is a first-order ordinary differential equation (ODE) with an initial condition. We will use the scipy.integrate.solve_ivp function in Python to solve this ODE.
Step 1: Identify the Type of Differential Equation
The given differential equation is:
\[
\frac{d x}{d t} = 2 t x + 4 e^{-t^2}
\]
with the initial condition \( x(0) = 10 \).
This is a first-order linear differential equation of the form:
\[
\frac{d x}{d t} + P(t)x = Q(t)
\]
where \( P(t) = -2t \) and \( Q(t) = 4e^{-t^2} \).
Step 2: Find the Integrating Factor
The integrating factor \( \mu(t) \) is given by:
\[
\mu(t) = e^{\int P(t) \, dt} = e^{\int -2t \, dt} = e^{-t^2}
\]
Step 3: Multiply the Differential Equation by the Integrating Factor
Multiplying both sides of the differential equation by \( e^{-t^2} \):
\[
e^{-t^2} \frac{d x}{d t} + e^{-t^2} (2 t x) = 4 e^{-t^2} e^{-t^2}
\]
\[
e^{-t^2} \frac{d x}{d t} + 2 t x e^{-t^2} = 4 e^{-2t^2}
\]
Step 4: Simplify the Left-Hand Side
Notice that the left-hand side is the derivative of \( x e^{-t^2} \):
\[
\frac{d}{dt} \left( x e^{-t^2} \right) = 4 e^{-2t^2}
\]
Step 5: Integrate Both Sides
Integrate both sides with respect to \( t \):
\[
\int \frac{d}{dt} \left( x e^{-t^2} \right) \, dt = \int 4 e^{-2t^2} \, dt
\]
\[
x e^{-t^2} = \int 4 e^{-2t^2} \, dt
\]
Step 6: Solve the Integral on the Right-Hand Side
The integral on the right-hand side is not elementary, but we can express it in terms of the error function \( \text{erf}(t) \):
\[
\int 4 e^{-2t^2} \, dt = 2 \sqrt{\pi} \, \text{erf}(\sqrt{2} t) + C
\]
Step 7: Apply the Initial Condition
Using the initial condition \( x(0) = 10 \):
\[
x(0) e^{-0^2} = 2 \sqrt{\pi} \, \text{erf}(0) + C
\]
\[
10 = 0 + C
\]
\[
C = 10
\]
Step 8: Write the General Solution
Substitute \( C \) back into the equation:
\[
x e^{-t^2} = 2 \sqrt{\pi} \, \text{erf}(\sqrt{2} t) + 10
\]
\[
x = e^{t^2} \left( 2 \sqrt{\pi} \, \text{erf}(\sqrt{2} t) + 10 \right)
\]