We show particular techniques to solve particular types of first order differential equations. The techniques were developed in the eighteenth and nineteenth centuries and the equations include **linear equations, separable equations, Euler homogeneous equations, **and** exact equations**. This way of studying differential equations reached a dead end pretty soon. Most of the differential equations cannot be solved by any of the techniques mentioned in the first sections. Instead of solving the equations they tried to show **whether an equation has solutions or not**, and what

**properties**such solution may have. This is less information than obtaining the solution, but it is still valuable information.

For example, let us mention Newton’s and Lagrange’s equations for classical mechanics, Maxwell’s equations for classical electromagnetism, Schrödinger equation for quantum mechanics, and Einstein’s equation for the general theory of gravitation.

Let us look at few real-life examples:

**(a) Radioactive Decay**: The amount u of a radioactive material changes in time as follows,

where k is a positive constant representing radioactive properties of the material.

This is **a First Order **Ordinary Differential Equation (**ODE).**

**(b) ****Newton’s law: **Mass times acceleration equals force, where is the particle mass,

where the unknown is —the position of the particle in space at the time . As we see above, the force may depend on time, on the particle position in space, and on the particle velocity.

This is a **Second Order Ordinary Differential Equation (ODE)**.

In both the examples mentioned above, we notice that the *unknown function* is dependent on a** single** Independent Variable. This type of equation is called as “

*Ordinary Differential Equation*“.

We know, that the order of a differential equation is the highest derivative order that appears in the equation. Hence, the **T****ime decay equation** in example (a) is* first order* and **Newton’s equation** in example (b) is *second order*.

A first order ODE on the unknown y is

where is given and .

The equation is *linear* if the source function is linear on its second argument, .

The linear equation has **constant coefficients **(as shown in example a) if both a and b above are constants. Otherwise the equation has ** variable coefficients **(as shown in example b). Let’s discuss few examples.

Examples:

a.

b.

Let’s solve a *linear differential equation* problem,

__Problem 1:__

Let’s integrate on both sides with respect to ,

According to the Theorem of Calculus, ,

so we get, .

Integrating both sides of the differential equation is not enough to find a solution y. We still need to find a primitive of y. We have only rewritten the original differential equation as an integral equation. Simply integrating both sides of a linear equation does not solve the equation.

We now state a precise formula for the solutions of constant coefficient linear equations. The proof relies on a new idea—a clever use of the chain rule for derivatives.

__THEOREM of Constant Coefficients:__

The linear differential equation, , where constants has infinitely many solutions,

, .

This is the general solution of the differential equation .

Theorem says that the equation has infinitely many solutions, one solution for each

value of the constant c, which is not determined by the equation.

The *Theorem of Constant Coefficients *cannot be generalized in a simple way to all linear equations with variable coefficients. However, there is a way to solve linear equations with both constant and variable coefficients—the **Integrating Factor Method.**

The step-by-step approach for Solving the numerical using Integrating Factor Method is as follows:

Step 1: Make sure your Linear first order ODE is arranged in the following form.

, where and can be functions of x or constants.

Step 2: Evaluate the value of **Integrating Factor **by** **using the formula, .

Step 3: Multiply the equation obtained in Step 1 by as shown below.

.

If you notice carefully here, the LHS part of this equation represents the *Product Rule. *

Thus, the LHS part can be modified as

Step 4: Integrate both sides with respect to x.

Step 5: Divide both sides of the obtained equation by .

Let us solve a problem.

__Problem 2: __

Since, the equation is in correct form, we skip the Step 1 for this numerical.

Step 2:

Step 3:

Modified as, , using *Product Rule*.

Step 4: Integrating both sides,

we get,

Step 5: By dividing both sides by , we get the solution of as

__Code:__

` ````
```// Integrating Factor Method
%use s2
// y' + yP(x) = Q(x) General Form
// Example: y' + 3y = x
// Here P(x) = 3 and Q(x) = x
// Integrating Factor = exp(integral(P(x)))
val IF: UnivariateRealFunction = object : AbstractUnivariateRealFunction() {
override fun evaluate(x: Double): Double {
return Math.exp(3 * x) // integral(P(x)) = 3x
}
}
// I = integral(IF*Q(x))
val IFqx: UnivariateRealFunction = object : AbstractUnivariateRealFunction() {
override fun evaluate(x: Double): Double {
return x*Math.exp(3 * x) // integral(P(x)) = 3x and Q(x) = x
}
}
val integrator: Integrator = Riemann()
val I: Double = integrator.integrate(IFqx, 0.0, 1.0)
// y*IF = I
// y = I/IF
val if2 = IF.evaluate(1.0) - IF.evaluate(0.0)
val ans = I/if2
println("The answer for y' + 3y = x from 0 to 1 is %f%n".format(ans))

__Output:__

Sometimes in physics one is not interested in all solutions to a differential equation, but only in those solutions satisfying extra conditions. For example, in the case of Newton’s second law of motion for a point particle, one could be interested only in solutions such that the particle is at a specific position at the initial time. Such condition is called an initial condition, and it selects a subset of solutions of the differential equation. An initial value problem means to find a solution to both a differential equation and an initial condition.

** Initial Conditions** are values of the solution and/or its derivative(s) at specific points. Solutions to differential equations are

**unique**and hence

*only one solution*will meet the given

*. You may refer this page to have a deeper understanding about Initial Conditions.*

**initial conditions**An ** Initial Value Problem** (abbreviated as

**IVP**) is a differential equation along with number of initial conditions specified. It is the problem of finding a function of when we know its derivative and its value at a particular point .

Let’s discuss an example to understand the concept:

__Problem 3:__

- Multiplying the term on both side of the equation
- We get,
- Integrating both the sides of the obtained equation,
- Hence, we get the general solution as
- By Initial Conditions, we know that when , .
- Therefore, substituting the value of as and as in the obtained general solution,
- We get the value of as .
- The general solution can be modified as,

__Code:__

` ````
```//Initial Value Solution for linear differential equation
%use s2
// define a linear function f(x)
val df2: UnivariateRealFunction = object : AbstractUnivariateRealFunction() {
override fun evaluate(x: Double): Double {
return (6*x) - 3 // y' = 6x-3
}
}
val in3: UnivariateRealFunction = object : AbstractUnivariateRealFunction() {
override fun evaluate(x: Double): Double {
return 3*x*x - 3*x // y = 3x^2 - 3x + c
}
}
val y_at_0 = 4.0 // y(0) = 4
val initial_value = in3.evaluate(0.0) + y_at_0
val integrator: Integrator = Riemann()
val I: Double = integrator.integrate(df2, 1.0, 2.0) + initial_value
println("The answer for y'= 6x - 3 when y(0) = 4 from 1 to 2 is %f%n".format(I))
// plot a function
val p = JGnuplot(false)
p.setTitle("General Solution Plot")
p.setTitleFontSize(14)
p.addPlot("3*x*x - 3*x + 4")
p.plot()

__Output:__

__THEOREM of Variable Coefficients:__

If the functions are continuous, then , has infinitely many solutions given by ,

where and .

Here, the general solution of equation is and the integrating factor is represented by .

** Problem 4: **Find all solutions of the equation,

**, with .**

- implies that and .
- Thus, equation can be modified as .
- Multiplying by both sides by , .
- Now, solve for as
- Hence, we get .
- Now multiplying in the equation, .
- Re-writing the equation in terms of derivative, .
- Integrating both sides of the equation, .
- We get, .

In simple words, a** Separable differential equation** is any equation that can be written in the form .

The method of separation of variables is used to find the general solution to a separable differential equation.

Use of of Separable Equations:

1.Separable Differential Equation,

2.Solution concentration,

3.Newton’s law of cooling,

Refer Applications of ODE section for detailed explanation.

__Problem 5:__ To find all solutions y to the differential equation

- Equation can be re-arranged as
- The functions and are defined as,
- Integrating with respect to on both sides of the differential equation, where is any constant.
- The substitution is ,
- We can write it as,
- Therefore,

given in

__IMPLICIT FORM.__