solving simple differential equations with initial condition built into integral

This page is dedicated to exploring the fascinating world of differential equations and their applications. We delve into various examples of first-order linear differential equations and demonstrate how to solve them analytically. We start with simple examples, such as equations with constant coefficients, and gradually move towards more complex ones involving exponential and trigonometric functions. Each example is accompanied by a step-by-step explanation of the solution process, which includes integrating both sides of the equation, applying the method of integration by substitution where necessary, and accounting for the constant of integration. We also discuss the importance of initial conditions and how they help us find the particular solution from the general solution. To aid in understanding, we provide graphs of the solutions where possible. These visual aids offer a clearer picture of the behavior of the solutions over a specified interval. Whether you’re a student, a teacher, or simply someone interested in mathematics, this page serves as a comprehensive guide to understanding and solving first-order linear differential equations.



Solving the Differential Equation \(y'(x) = \frac{1}{x}\), \(y(1) = 3\)

We are given the differential equation \(y'(x) = \frac{1}{x}\) and the initial condition \(y(1) = 3\). The differential equation tells us that the derivative of \(y\) with respect to \(x\) is \(\frac{1}{x}\), and the initial condition tells us that when \(x = 1\), \(y(x) = 3\).

The integral of \(y'(x)\) with respect to \(x\) is \(y(x)\), and the integral of \(\frac{1}{x}\) with respect to \(x\) is \(\ln|x|\). We can write an equation that relates \(y(x)\), \(y(1)\), and the integral of \(\frac{1}{x}\) from 1 to \(x\): \(y(x) – y(1) = \int_{1}^{x} \frac{1}{t} dt\).

Evaluating the integral on the right-hand side of the equation, we get \(y(x) – y(1) = \ln|x| – \ln|1|\). We can substitute the initial condition \(y(1) = 3\) into the equation to get \(y(x) – 3 = \ln|x|\).

Solving for \(y(x)\), we get the solution to the differential equation: \(y(x) = \ln|x| + 3\). However, the differential equation is not defined at \(x = 0\), and the initial condition is given for \(x = 1\), so the solution is valid only for \(x > 0\).

Here is the graph of the solution \(y(x) = \ln|x| + 3\) for \(x\) in the interval \((0, 5)\):

Solution graph

The solution \(y(x) = \ln|x| + 3\) is not valid for \(x < 0\) due to the initial condition \(y(1) = 3\) and the nature of the differential equation \(y'(x) = \frac{1}{x}\). The differential equation is undefined at \(x = 0\), splitting the solutions into two separate intervals, \(x < 0\) and \(x > 0\), each with their own unique solutions. The initial condition is given for a point where \(x > 0\), so we are specifically looking for the solution that passes through the point (1, 3), which is in the interval \(x > 0\). Therefore, the solution is valid only for \(x > 0\).



Using a dummy variable in the process of integration is a common practice to avoid confusion. The dummy variable is a placeholder that disappears after the integration is performed. For example, in the integral \(\int_{1}^{x} \frac{1}{t} dt\), \(t\) is a dummy variable. It stands in for the actual variable of integration, allowing us to clearly see that we’re integrating with respect to \(t\), not \(x\).

If we didn’t use a dummy variable and wrote the integral as \(\int_{1}^{x} \frac{1}{x} dx\), it could lead to confusion. In this case, it might seem like \(x\) is both the upper limit of integration and the variable of integration, which is not the case. In the context of differential equations, using a dummy variable can help clarify the variable with respect to which we’re integrating, especially when the integral involves the independent variable of the differential equation.


Solving the Differential Equation \(y'(x) = \cot(x)\), \(y(\pi/4) = 1\)

We are given the differential equation \(y'(x) = \cot(x)\) and the initial condition \(y(\pi/4) = 1\).

The integral of \(y'(x)\) with respect to \(x\) is \(y(x)\), and the integral of \(\cot(x)\) with respect to \(x\) is \(\ln|\sin(x)|\). However, we need to account for the constant of integration, which we’ll denote as \(C\). So, we have:

\[ y(x) – y(\pi/4) = \int_{\pi/4}^{x} \cot(t) dt \]

Evaluating the integral on the right-hand side, we get:

\[ y(x) – y(\pi/4) = \ln|\sin(x)| – \ln|\sin(\pi/4)| \]

Substituting the initial condition into the equation, we get:

\[ y(x) – 1 = \ln|\sin(x)| – \ln|\sin(\pi/4)| \]

Solving for \(y(x)\), we get the solution to the differential equation:

\[ y(x) = \ln|\sin(x)| + \frac{1}{2}\ln(2) + 1 \]


Solving the Differential Equation \(y'(t) = 4t – 6\), \(y(0) = 1\)

We are given the differential equation \(y'(t) = 4t – 6\) and the initial condition \(y(0) = 1\).

This is a first-order linear differential equation. To solve it, we can integrate both sides with respect to \(t\). The integral of \(y'(t)\) is \(y(t)\), and the integral of \(4t – 6\) is \(2t^2 – 6t\). However, we need to account for the constant of integration, which we’ll denote as \(C\).

So, we have:

\[ y(t) = 2t^2 – 6t + C \]

Substituting the initial condition into the equation, we get:

\[ 1 = 2(0)^2 – 6(0) + C \]

Solving for \(C\), we find that \(C = 1\). Therefore, the solution to the differential equation is:

\[ y(t) = 2t^2 – 6t + 1 \]

Unfortunately, we were unable to generate the graph of the solution \(y(t) = 2t^2 – 6t + 1\).



Solving the Differential Equation \(x'(t) = te^{-t^2}\), \(x(0) = 1\)

We are given the differential equation \(x'(t) = te^{-t^2}\) and the initial condition \(x(0) = 1\).

To solve it, we can integrate both sides with respect to \(t\). The integral of \(x'(t)\) is \(x(t)\), and the integral of \(te^{-t^2}\) is a bit more complicated.

To find the integral of \(te^{-t^2}\), we can use the method of integration by substitution. Let’s set \(u = -t^2\). Then, \(du = -2tdt\), or \(tdt = -\frac{1}{2}du\).

Substituting these into the integral, we get \(\int te^{-t^2} dt = -\frac{1}{2}\int e^u du\), which simplifies to \(-\frac{1}{2}e^u\). Substituting \(u = -t^2\) back in, we get \(-\frac{1}{2}e^{-t^2}\).

So, we have \(x(t) – x(0) = -\frac{1}{2}e^{-t^2}\).

Substituting the initial condition \(x(0) = 1\) into the equation, we get \(x(t) – 1 = -\frac{1}{2}e^{-t^2}\).

Solving for \(x(t)\), we get \(x(t) = 1 – \frac{1}{2}e^{-t^2}\).

However, we need to account for the constant of integration, which we’ll denote as \(C\). So, we have:

\(x(t) = 1 – \frac{1}{2}e^{-t^2} + C\)

Substituting the initial condition into the equation, we get:

\(1 = 1 – \frac{1}{2}e^{0} + C\)

Solving for \(C\), we find that \(C = \frac{1}{2}\). Therefore, the solution to the differential equation is:

\(x(t) = 1 – \frac{1}{2}e^{-t^2} + \frac{1}{2}\)

Simplifying the equation, we get:

\(x(t) = \frac{-1 + 3e^{t^2}}{2e^{t^2}}\)

Here is the graph of the solution \(x(t) = \frac{-1 + 3e^{t^2}}{2e^{t^2}}\) for \(t\) in the interval \((-3, 3)\):

Solution Graph