Module 4: Differential Equations

Initial-value problems, learning outcomes.

  • Identify an initial-value problem
  • Identify whether a given function is a solution to a differential equation or an initial-value problem

Usually a given differential equation has an infinite number of solutions, so it is natural to ask which one we want to use. To choose one solution, more information is needed. Some specific information that can be useful is an initial value , which is an ordered pair that is used to find a particular solution.

A differential equation together with one or more initial values is called an initial-value problem . The general rule is that the number of initial values needed for an initial-value problem is equal to the order of the differential equation. For example, if we have the differential equation [latex]{y}^{\prime }=2x[/latex], then [latex]y\left(3\right)=7[/latex] is an initial value, and when taken together, these equations form an initial-value problem. The differential equation [latex]y\text{''}-3{y}^{\prime }+2y=4{e}^{x}[/latex] is second order, so we need two initial values. With initial-value problems of order greater than one, the same value should be used for the independent variable. An example of initial values for this second-order equation would be [latex]y\left(0\right)=2[/latex] and [latex]{y}^{\prime }\left(0\right)=-1[/latex]. These two initial values together with the differential equation form an initial-value problem. These problems are so named because often the independent variable in the unknown function is [latex]t[/latex], which represents time. Thus, a value of [latex]t=0[/latex] represents the beginning of the problem.

Example: Verifying a Solution to an Initial-Value Problem

Verify that the function [latex]y=2{e}^{-2t}+{e}^{t}[/latex] is a solution to the initial-value problem

For a function to satisfy an initial-value problem, it must satisfy both the differential equation and the initial condition. To show that [latex]y[/latex] satisfies the differential equation, we start by calculating [latex]{y}^{\prime }[/latex]. This gives [latex]{y}^{\prime }=-4{e}^{-2t}+{e}^{t}[/latex]. Next we substitute both [latex]y[/latex] and [latex]{y}^{\prime }[/latex] into the left-hand side of the differential equation and simplify:

This is equal to the right-hand side of the differential equation, so [latex]y=2{e}^{-2t}+{e}^{t}[/latex] solves the differential equation. Next we calculate [latex]y\left(0\right)\text{:}[/latex]

This result verifies the initial value. Therefore the given function satisfies the initial-value problem.

Watch the following video to see the worked solution to Example: Verifying a Solution to an Initial-Value Problem

You can view the transcript for this segmented clip of “4.1.5” here (opens in new window) .

Verify that [latex]y=3{e}^{2t}+4\sin{t}[/latex] is a solution to the initial-value problem

First verify that [latex]y[/latex] solves the differential equation. Then check the initial value.

In the previous example, the initial-value problem consisted of two parts. The first part was the differential equation [latex]{y}^{\prime }+2y=3{e}^{x}[/latex], and the second part was the initial value [latex]y\left(0\right)=3[/latex]. These two equations together formed the initial-value problem.

The same is true in general. An initial-value problem will consists of two parts: the differential equation and the initial condition. The differential equation has a family of solutions, and the initial condition determines the value of [latex]C[/latex]. The family of solutions to the differential equation in the example is given by [latex]y=2{e}^{-2t}+C{e}^{t}[/latex]. This family of solutions is shown in Figure 2, with the particular solution [latex]y=2{e}^{-2t}+{e}^{t}[/latex] labeled.

A graph of a family of solutions to the differential equation y’ + 2 y = 3 e ^ t, which are of the form y = 2 e ^ (-2 t) + C e ^ t. The versions with C = 1, 0.5, and -0.2 are shown, among others not labeled. For all values of C, the function increases rapidly for [latex]t[/latex] < 0 as [latex]t[/latex] goes to negative infinity. For C > 0, the function changes direction and increases in a gentle curve as [latex]t[/latex] goes to infinity. Larger values of C have a tighter curve closer to the [latex]y[/latex]-axis and at a higher y value. For C = 0, the function goes to 0 as [latex]t[/latex] goes to infinity. For C < 0, the function continues to decrease as [latex]t[/latex] goes to infinity.

Figure 2. A family of solutions to the differential equation [latex]{y}^{\prime }+2y=3{e}^{t}[/latex]. The particular solution [latex]y=2{e}^{-2t}+{e}^{t}[/latex] is labeled.

Example: Solving an Initial-value Problem

Solve the following initial-value problem:

The first step in solving this initial-value problem is to find a general family of solutions. To do this, we find an antiderivative of both sides of the differential equation

We are able to integrate both sides because the y term appears by itself. Notice that there are two integration constants: [latex]{C}_{1}[/latex] and [latex]{C}_{2}[/latex]. Solving the previous equation for [latex]y[/latex] gives

Because [latex]{C}_{1}[/latex] and [latex]{C}_{2}[/latex] are both constants, [latex]{C}_{2}-{C}_{1}[/latex] is also a constant. We can therefore define [latex]C={C}_{2}-{C}_{1}[/latex], which leads to the equation

Next we determine the value of [latex]C[/latex]. To do this, we substitute [latex]x=0[/latex] and [latex]y=5[/latex] into our aforementioned equation and solve for [latex]C\text{:}[/latex]

Now we substitute the value [latex]C=2[/latex] into our equation. The solution to the initial-value problem is [latex]y=3{e}^{x}+\frac{1}{3}{x}^{3}-4x+2[/latex].

The difference between a general solution and a particular solution is that a general solution involves a family of functions, either explicitly or implicitly defined, of the independent variable. The initial value or values determine which particular solution in the family of solutions satisfies the desired conditions.

Solve the initial-value problem

First take the antiderivative of both sides of the differential equation. Then substitute [latex]x=0[/latex] and [latex]y=8[/latex] into the resulting equation and solve for [latex]C[/latex].

[latex]y=\frac{1}{3}{x}^{3}-2{x}^{2}+3x - 6{e}^{x}+14[/latex]

In physics and engineering applications, we often consider the forces acting upon an object, and use this information to understand the resulting motion that may occur. For example, if we start with an object at Earth’s surface, the primary force acting upon that object is gravity. Physicists and engineers can use this information, along with Newton’s second law of motion (in equation form [latex]F=ma[/latex], where [latex]F[/latex] represents force, [latex]m[/latex] represents mass, and [latex]a[/latex] represents acceleration), to derive an equation that can be solved.

A picture of a baseball with an arrow underneath it pointing down. The arrow is labeled g = -9.8 m/sec ^ 2.

Figure 3. For a baseball falling in air, the only force acting on it is gravity (neglecting air resistance).

In Figure 3. we assume that the only force acting on a baseball is the force of gravity. This assumption ignores air resistance. (The force due to air resistance is considered in a later discussion.) The acceleration due to gravity at Earth’s surface, [latex]g[/latex], is approximately [latex]9.8{\text{m/s}}^{2}[/latex]. We introduce a frame of reference, where Earth’s surface is at a height of 0 meters. Let [latex]v\left(t\right)[/latex] represent the velocity of the object in meters per second. If [latex]v\left(t\right)>0[/latex], the ball is rising, and if [latex]v\left(t\right)<0[/latex], the ball is falling (Figure 4).

A picture of a baseball with an arrow above it pointing up and an arrow below it pointing down. The arrow pointing up is labeled v(t) > 0, and the arrow pointing down is labeled v(t) < 0.

Figure 4. Possible velocities for the rising/falling baseball.

Our goal is to solve for the velocity [latex]v\left(t\right)[/latex] at any time [latex]t[/latex]. To do this, we set up an initial-value problem. Suppose the mass of the ball is [latex]m[/latex], where [latex]m[/latex] is measured in kilograms. We use Newton’s second law, which states that the force acting on an object is equal to its mass times its acceleration [latex]\left(F=ma\right)[/latex]. Acceleration is the derivative of velocity, so [latex]a\left(t\right)={v}^{\prime }\left(t\right)[/latex]. Therefore the force acting on the baseball is given by [latex]F=m{v}^{\prime }\left(t\right)[/latex]. However, this force must be equal to the force of gravity acting on the object, which (again using Newton’s second law) is given by [latex]{F}_{g}=\text{-}mg[/latex], since this force acts in a downward direction. Therefore we obtain the equation [latex]F={F}_{g}[/latex], which becomes [latex]m{v}^{\prime }\left(t\right)=\text{-}mg[/latex]. Dividing both sides of the equation by [latex]m[/latex] gives the equation

Notice that this differential equation remains the same regardless of the mass of the object.

We now need an initial value. Because we are solving for velocity, it makes sense in the context of the problem to assume that we know the initial velocity , or the velocity at time [latex]t=0[/latex]. This is denoted by [latex]v\left(0\right)={v}_{0}[/latex].

Example: Velocity of a Moving Baseball

A baseball is thrown upward from a height of [latex]3[/latex] meters above Earth’s surface with an initial velocity of [latex]10\text{m/s}[/latex], and the only force acting on it is gravity. The ball has a mass of [latex]0.15\text{kg}[/latex] at Earth’s surface.

  • Find the velocity [latex]v\left(t\right)[/latex] of the baseball at time [latex]t[/latex].
  • What is its velocity after [latex]2[/latex] seconds?

where [latex]g=9.8{\text{m/s}}^{2}[/latex]. The initial condition is [latex]v\left(0\right)={v}_{0}[/latex], where [latex]{v}_{0}=10\text{m/s}\text{.}[/latex] Therefore the initial-value problem is [latex]{v}^{\prime }\left(t\right)=-9.8{\text{m/s}}^{2},v\left(0\right)=10\text{m/s}\text{.}[/latex] The first step in solving this initial-value problem is to take the antiderivative of both sides of the differential equation. This gives

The next step is to solve for [latex]C[/latex]. To do this, substitute [latex]t=0[/latex] and [latex]v\left(0\right)=10\text{:}[/latex]

Suppose a rock falls from rest from a height of [latex]100[/latex] meters and the only force acting on it is gravity. Find an equation for the velocity [latex]v\left(t\right)[/latex] as a function of time, measured in meters per second.

What is the initial velocity of the rock? Use this with the differential equation in the example: Velocity of a Moving Baseball to form an initial-value problem, then solve for [latex]v\left(t\right)[/latex].

[latex]v\left(t\right)=-9.8t[/latex]

A natural question to ask after solving this type of problem is how high the object will be above Earth’s surface at a given point in time. Let [latex]s\left(t\right)[/latex] denote the height above Earth’s surface of the object, measured in meters. Because velocity is the derivative of position (in this case height), this assumption gives the equation [latex]{s}^{\prime }\left(t\right)=v\left(t\right)[/latex]. An initial value is necessary; in this case the initial height of the object works well. Let the initial height be given by the equation [latex]s\left(0\right)={s}_{0}[/latex]. Together these assumptions give the initial-value problem

If the velocity function is known, then it is possible to solve for the position function as well.

Example: Height of a Moving Baseball

A baseball is thrown upward from a height of [latex]3[/latex] meters above Earth’s surface with an initial velocity of [latex]10\text{m/s}[/latex], and the only force acting on it is gravity. The ball has a mass of [latex]0.15[/latex] kilogram at Earth’s surface.

  • Find the position [latex]s\left(t\right)[/latex] of the baseball at time [latex]t[/latex].
  • What is its height after [latex]2[/latex] seconds?

Next we substitute [latex]t=0[/latex] and solve for [latex]C\text{:}[/latex]

  • 4.1.5. Authored by : Ryan Melton. License : CC BY: Attribution
  • Calculus Volume 2. Authored by : Gilbert Strang, Edwin (Jed) Herman. Provided by : OpenStax. Located at : https://openstax.org/books/calculus-volume-2/pages/1-introduction . License : CC BY-NC-SA: Attribution-NonCommercial-ShareAlike . License Terms : Access for free at https://openstax.org/books/calculus-volume-2/pages/1-introduction

Footer Logo Lumen Candela

Privacy Policy

Calcworkshop

Solving Initial Value Problems (IVPs) A Comprehensive Guide

// Last Updated: April 17, 2023 - Watch Video //

Did you know that when you solve a differential equation with a specific condition, you’re tackling an initial value problem ?

Jenn (B.S., M.Ed.) of Calcworkshop® teaching initial value problems

Jenn, Founder Calcworkshop ® , 15+ Years Experience (Licensed & Certified Teacher)

In simpler terms, you’re looking for a solution that meets certain requirements to find a unique answer .

In a previous lesson, you learned about Ordinary Differential Equations . Now, you’ll dive deeper to explore n-parameter family of solutions and use an initial condition (IC) to figure out the constants in that family.

Understanding n-parameter Family of Solutions

So, what’s an n-parameter family?

Well, a first-order differential equation \(F\left(x, y, y^{\prime}\right)=0\) typically has a single arbitrary constant called a parameter \(\mathrm{c}\), whereas a second-order differential equation \(F\left(x, y, y^{\prime}, y^{\prime \prime}\right)=0\) usually has two arbitrary constants, denoted \(c_{1}\) and \(c_{2}\).

one two three parameter solution formulas

One Two Three Parameter —  Solution Formulas

Therefore, a single differential equation can possess an infinite number of solutions corresponding to the unlimited number of choices for the parameters.

So, an n-parameter family of solutions of a given nth-order differential equation represents the set of all solutions of the equation. And we typically refer to an \(n\)-parameter family of solutions as the general solution – it’s easier to say!

Consequently, if we assign arbitrary constants to the differential equation, referred to as initial conditions, our general solution is called a particular solution because it represents a specific answer for some particular constraint.

It should also be noted that solutions of an \(\mathrm{n}\)-th order differential equation that are not included in the general solution are called singular solutions.

Example: Verifying and Finding Solutions to Initial Value Problems

Let’s look at an example of how we will verify and find a solution to an initial value problem given an ordinary differential equation.

Verify that the function \(y=c_{1} e^{2 x}+c_{2} e^{-2 x}\) is a solution of the differential equation \(y^{\prime \prime}-4 y=0\).

Then find a solution of the second-order IVP consisting of the differential equation that satisfies the initial conditions \(y(0)=1\) and \(y^{\prime}(0)=2\).

First, we will verify that the function is a solution by noticing that we are given a two-parameter family of solutions because we have a second-order differential equation. Therefore, we need to find the second derivative of our function.

\begin{align*} \begin{aligned} & y=c_{1} e^{2 x}+c_{2} e^{-2 x} \\ & y^{\prime}=2 c_{1} e^{2 x}-2 c_{2} e^{-2 x} \\ & y^{\prime \prime}=4 c_{1} e^{2 x}+4 c_{2} e^{-2 x} \end{aligned} \end{align*}

Now, we will substitute our derivatives into the ODE and verify that the left-hand side equals the right-hand side.

\begin{equation} \begin{aligned} & y^{\prime \prime}-4 y=0 \\ & \left(4 c_1 e^{2 x}+4 c_2 e^{-2 x}\right)-4\left(c_1 e^{2 x}+c_2 e^{-2 x}\right)=0 \\ & 4 c_1 e^{2 x}+4 c_2 e^{-2 x}-4 c_1 e^{2 x}-4 c_2 e^{-2 x}=0 \\ & 0=0 \end{aligned} \end{equation}

Now, we will find a solution to the second-order IVP by substituting the initial conditions into their corresponding functions.

\begin{equation} \text { If } y=c_1 e^{2 x}+c_2 e^{-2 x} \text { and } y(0)=1, \text { then } \end{equation}

\begin{align*} 1=c_{1} e^{2(0)}+c_{2} e^{-2(0)} \Rightarrow 1=c_{1}(1)+c_{2}(1) \Rightarrow 1=c_{1}+c_{2} \end{align*}

\begin{equation} \text { If } y^{\prime}=2 c_1 e^{2 x}-2 c_2 e^{-2 x} \text { and } y^{\prime}(0)=2 \text {, then } \end{equation}

\begin{align*} 2=2 c_{1} e^{2(0)}-2 c_{2} e^{-2(0)} \Rightarrow 2=2 c_{1}(1)-2(1) \Rightarrow 2=2 c_{1}-2 c_{2} \end{align*}

Next, we will solve the resulting system for \(c_{1}\) and \(c_{2}\).

\begin{align*} \left\{\begin{array} { c } { 1 = c _ { 1 } + c _ { 2 } } \\ { 2 = 2 c _ { 1 } – 2 c _ { 2 } } \end{array} \Rightarrow \left\{\begin{array}{c} c_{1}+c_{2}=1 \\ c_{1}-c_{2}=1 \end{array} \Rightarrow c_{1}=1 \quad \text { and } \quad c_{2}=0\right.\right. \end{align*}

Therefore, the particular solution for the IVP given the initial condition is:

\begin{equation} \begin{aligned} & y=(1) e^{2 x}+(0) e^{-2 x} \\ & y=e^{2 x} \end{aligned} \end{equation}

I find that it’s helpful to remember that Initial condition(s) are values of the solution and/or its derivative(s) at specific points. Which means, according to Paul’s Online Notes that solutions to “nice enough” differential equations are unique; hence, only one solution will meet the given conditions.

The Game-Changing Existence and Uniqueness Theorem

But how do we know there will be a solution to the differential equation?

The Existence of a Unique Solution Theorem is a key concept in this course. It provides specific conditions that ensure a unique solution exists for an Initial Value Problem (IVP).

Definition: The existence-unique solution theorem says that if we let \(\mathrm{R}\) be a rectangular region in the \(x y-\) plane defined by \(a \leq x \leq b, c \leq y \leq d\) that contains the point \(\left(x_{0}, y_{0}\right)\) in its interior. And if \(f(x, y)\) and \(\frac{\partial f}{\partial y}\) are continuous on \(\mathrm{R}\), then there exists some interval \(\left(x_{0}-h, x_{0}+h\right), h>0\), contained in \([a, b]\), and a unique function \(y(x)\), defined on \(I_{0}\), that is a solution of the initial value problem.

That’s pretty “mathy” right?!

In *sorta* simpler terms, the existence-unique solution theorem essentially states that under specific conditions, there is a unique solution for an initial value problem. If a point (x₀, y₀) is within a rectangular region R in the xy-plane, and both the function f(x, y) and its partial derivative with respect to y are continuous in R , then there is an interval (x₀-h, x₀+h), with h>0, contained within the range [a, b]. Within this interval, a unique function y(x) exists as a solution to the initial value problem.

existence uniqueness theorem

Existence Uniqueness Theorem — Graphical

Example: Solving an IVP with Given Initial Conditions

Let’s break this down into easy-to-understand steps by working an example.

Determine whether the existence-uniqueness theorem implies the given initial value problem has a unique solution through the given point.

\begin{equation} y^{\prime}=y^{2 / 3},(8,4) \end{equation}

First, we will verify that our ODE is continuous by letting \(f(x, y)=y^{\prime}\) and graphing the curve.

\begin{equation} f(x, y)=y^{2 / 3} \end{equation}

ode 3d graph

ODE — 3D Graph

So, \(f(x, y)\) is continuous for all real numbers.

Next, we will take the partial derivative with respect to \(\mathrm{y}\) and determine if the partial derivative is also continuous.

\begin{align*} \frac{\partial f}{\partial y}=f_{y}=\frac{2}{3} y^{-1 / 3}=\frac{2}{3}\left(\frac{1}{\sqrt[3]{y}}\right) \end{align*}

This indicates that a unique solution exists when \(y>0\).

Therefore, we can safely conclude that our given point \((8,4)\) will provide a unique solution because our \(y\)-value is greater than zero.

Going forward…

So, together we will dive into the world of n-th parameter family of solutions, find solutions for initial value problems, and determine the existence of a solution and whether a differential equation contains a unique solution through a given point.

Let’s jump right in.

Video Tutorial w/ Full Lesson & Detailed Examples

initial value problem example

Get access to all the courses and over 450 HD videos with your subscription

Monthly and Yearly Plans Available

Get My Subscription Now

Still wondering if CalcWorkshop is right for you? Take a Tour and find out how a membership can take the struggle out of learning math.

5 Star Excellence award from Shopper Approved for collecting at least 100 5 star reviews

HIGH SCHOOL

  • ACT Tutoring
  • SAT Tutoring
  • PSAT Tutoring
  • ASPIRE Tutoring
  • SHSAT Tutoring
  • STAAR Tutoring

GRADUATE SCHOOL

  • MCAT Tutoring
  • GRE Tutoring
  • LSAT Tutoring
  • GMAT Tutoring
  • AIMS Tutoring
  • HSPT Tutoring
  • ISAT Tutoring
  • SSAT Tutoring

Search 50+ Tests

Loading Page

math tutoring

  • Elementary Math
  • Pre-Calculus
  • Trigonometry

science tutoring

Foreign languages.

  • Mandarin Chinese

elementary tutoring

  • Computer Science

Search 350+ Subjects

  • Video Overview
  • Tutor Selection Process
  • Online Tutoring
  • Mobile Tutoring
  • Instant Tutoring
  • How We Operate
  • Our Guarantee
  • Impact of Tutoring
  • Reviews & Testimonials
  • Media Coverage
  • About Varsity Tutors

Differential Equations : Initial-Value Problems

Study concepts, example questions & explanations for differential equations, all differential equations resources, example questions, example question #1 : initial value problems.

how to solve the initial value problem

First identify what is known.

The general function is,

how to solve the initial value problem

The initial value is six in mathematical terms is,

how to solve the initial value problem

So this is a separable differential equation, but it is also subject to an initial condition. This means that you have enough information so that there should not be a constant in the final answer.

You start off by getting all of the like terms on their respective sides, and then taking the anti-derivative. Your pre anti-derivative equation will look like:

how to solve the initial value problem

Then taking the anti-derivative, you include a C value:

how to solve the initial value problem

Then, using the initial condition given, we can solve for the value of C:

how to solve the initial value problem

Solving for C, we get 

how to solve the initial value problem

So this is a separable differential equation with a given initial value.

To start off, gather all of the like variables on separate sides.

how to solve the initial value problem

Then integrate, and make sure to add a constant at the end

how to solve the initial value problem

Plug in the initial condition to get:

how to solve the initial value problem

Solve the separable differential equation

how to solve the initial value problem

none of these answers

To start off, gather all of the like variables on separate sides. 

Notice that when you divide sec(y) to the other side, it will just be cos(y),

and the csc(x) on the bottom is equal to sin(x) on the top. 

how to solve the initial value problem

In order to solve for y, we just need to take the arcsin of both sides:

how to solve the initial value problem

Solve the differential equation

how to solve the initial value problem

Then, after the anti-derivative, make sure to add the constant C:

how to solve the initial value problem

Solve for y

how to solve the initial value problem

None of these answers

how to solve the initial value problem

Taking the anti-derivative once, we get:

how to solve the initial value problem

we get the final answer of:

how to solve the initial value problem

Example Question #8 : Initial Value Problems

Solve the differential equation for y

how to solve the initial value problem

subject to the initial condition:

how to solve the initial value problem

Solving for C:

how to solve the initial value problem

Then taking the square root to solve for y, we get:

how to solve the initial value problem

Example Question #10 : Initial Value Problems

Display vt optimized

Report an issue with this question

If you've found an issue with this question, please let us know. With the help of the community we can continue to improve our educational resources.

DMCA Complaint

If you believe that content available by means of the Website (as defined in our Terms of Service) infringes one or more of your copyrights, please notify us by providing a written notice (“Infringement Notice”) containing the information described below to the designated agent listed below. If Varsity Tutors takes action in response to an Infringement Notice, it will make a good faith attempt to contact the party that made such content available by means of the most recent email address, if any, provided by such party to Varsity Tutors.

Your Infringement Notice may be forwarded to the party that made the content available or to third parties such as ChillingEffects.org.

Please be advised that you will be liable for damages (including costs and attorneys’ fees) if you materially misrepresent that a product or activity is infringing your copyrights. Thus, if you are not sure content located on or linked-to by the Website infringes your copyright, you should consider first contacting an attorney.

Please follow these steps to file a notice:

You must include the following:

A physical or electronic signature of the copyright owner or a person authorized to act on their behalf; An identification of the copyright claimed to have been infringed; A description of the nature and exact location of the content that you claim to infringe your copyright, in \ sufficient detail to permit Varsity Tutors to find and positively identify that content; for example we require a link to the specific question (not just the name of the question) that contains the content and a description of which specific portion of the question – an image, a link, the text, etc – your complaint refers to; Your name, address, telephone number and email address; and A statement by you: (a) that you believe in good faith that the use of the content that you claim to infringe your copyright is not authorized by law, or by the copyright owner or such owner’s agent; (b) that all of the information contained in your Infringement Notice is accurate, and (c) under penalty of perjury, that you are either the copyright owner or a person authorized to act on their behalf.

Send your complaint to our designated agent at:

Charles Cohn Varsity Tutors LLC 101 S. Hanley Rd, Suite 300 St. Louis, MO 63105

Or fill out the form below:

Solver Title

Practice

Generating PDF...

  • Pre Algebra Order of Operations Factors & Primes Fractions Long Arithmetic Decimals Exponents & Radicals Ratios & Proportions Percent Modulo Number Line Mean, Median & Mode
  • Algebra Equations Inequalities System of Equations System of Inequalities Basic Operations Algebraic Properties Partial Fractions Polynomials Rational Expressions Sequences Power Sums Interval Notation Pi (Product) Notation Induction Logical Sets Word Problems
  • Pre Calculus Equations Inequalities Scientific Calculator Scientific Notation Arithmetics Complex Numbers Polar/Cartesian Simultaneous Equations System of Inequalities Polynomials Rationales Functions Arithmetic & Comp. Coordinate Geometry Plane Geometry Solid Geometry Conic Sections Trigonometry
  • Calculus Derivatives Derivative Applications Limits Integrals Integral Applications Integral Approximation Series ODE Multivariable Calculus Laplace Transform Taylor/Maclaurin Series Fourier Series Fourier Transform
  • Functions Line Equations Functions Arithmetic & Comp. Conic Sections Transformation
  • Linear Algebra Matrices Vectors
  • Trigonometry Identities Proving Identities Trig Equations Trig Inequalities Evaluate Functions Simplify
  • Statistics Mean Geometric Mean Quadratic Mean Average Median Mode Order Minimum Maximum Probability Mid-Range Range Standard Deviation Variance Lower Quartile Upper Quartile Interquartile Range Midhinge Standard Normal Distribution
  • Physics Mechanics
  • Chemistry Chemical Reactions Chemical Properties
  • Finance Simple Interest Compound Interest Present Value Future Value
  • Economics Point of Diminishing Return
  • Conversions Roman Numerals Radical to Exponent Exponent to Radical To Fraction To Decimal To Mixed Number To Improper Fraction Radians to Degrees Degrees to Radians Hexadecimal Scientific Notation Distance Weight Time Volume
  • Pre Algebra
  • Pre Calculus
  • Linear Algebra
  • Trigonometry
  • Conversions

Click to reveal more operations

Most Used Actions

Number line.

  • x^{2}-x-6=0
  • -x+3\gt 2x+1
  • line\:(1,\:2),\:(3,\:1)
  • prove\:\tan^2(x)-\sin^2(x)=\tan^2(x)\sin^2(x)
  • \frac{d}{dx}(\frac{3x+9}{2-x})
  • (\sin^2(\theta))'
  • \lim _{x\to 0}(x\ln (x))
  • \int e^x\cos (x)dx
  • \int_{0}^{\pi}\sin(x)dx
  • \sum_{n=0}^{\infty}\frac{3}{2^n}

step-by-step

initial value problem

  • My Notebook, the Symbolab way Math notebooks have been around for hundreds of years. You write down problems, solutions and notes to go back...

Please add a message.

Message received. Thanks for the feedback.

Initial and Boundary Value Problems

Overview of initial (ivps) and boundary value problems (bvps).

DSolve can be used for finding the general solution to a differential equation or system of differential equations. The general solution gives information about the structure of the complete solution space for the problem. However, in practice, one is often interested only in particular solutions that satisfy some conditions related to the area of application. These conditions are usually of two types.

how to solve the initial value problem

The symbolic solution of both IVPs and BVPs requires knowledge of the general solution for the problem. The final step, in which the particular solution is obtained using the initial or boundary values, involves mostly algebraic operations, and is similar for IVPs and for BVPs.

IVPs and BVPs for linear differential equations are solved rather easily since the final algebraic step involves the solution of linear equations. However, if the underlying equations are nonlinear , the solution could have several branches, or the arbitrary constants from the general solution could occur in different arguments of transcendental functions. As a result, it is not always possible to complete the final algebraic step for nonlinear problems. Finally, if the underlying equations have piecewise (that is, discontinuous) coefficients, an IVP naturally breaks up into simpler IVPs over the regions in which the coefficients are continuous.

Linear IVPs and BVPs

To begin, consider an initial value problem for a linear first-order ODE.

how to solve the initial value problem

It should be noted that, in contrast to initial value problems, there are no general existence or uniqueness theorems when boundary values are prescribed, and there may be no solution in some cases.

how to solve the initial value problem

The previous discussion of linear equations generalizes to the case of higher-order linear ODEs and linear systems of ODEs.

how to solve the initial value problem

Nonlinear IVPs and BVPs

Many real-world applications require the solution of IVPs and BVPs for nonlinear ODEs. For example, consider the logistic equation, which occurs in population dynamics.

It may not always be possible to obtain a symbolic solution to an IVP or BVP for a nonlinear equation. Numerical methods may be necessary in such cases.

IVPs with Piecewise Coefficients

The differential equations that arise in modern applications often have discontinuous coefficients. DSolve can handle a wide variety of such ODEs with piecewise coefficients. Some of the functions used in these equations are UnitStep , Max , Min , Sign , and Abs . These functions and combinations of them can be converted into Piecewise objects.

how to solve the initial value problem

A piecewise ODE can be thought of as a collection of ODEs over disjoint intervals such that the expressions for the coefficients and the boundary conditions change from one interval to another. Thus, different intervals have different solutions, and the final solution for the ODE is obtained by patching together the solutions over the different intervals.

how to solve the initial value problem

If there are a large number of discontinuities in a problem, it is convenient to use Piecewise directly in the formulation of the problem.

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how

logo white

  • Mathematicians
  • Math Lessons
  • Square Roots
  • Math Calculators

Solve Initial Value Problem-Definition, Application and Examples

JUMP TO TOPIC

Existence and Uniqueness

Continuity and differentiability, dependence on initial conditions, local vs. global solutions, higher order odes, boundary behavior, particular and general solutions, engineering, biology and medicine, economics and finance, environmental science, computer science, control systems.

Solve Initial Value Problem Definition Application and

Solving initial value problems (IVPs) is an important concept in differential equations . Like the unique key that opens a specific door, an initial condition can unlock a unique solution to a differential equation.

As we dive into this article, we aim to unravel the mysterious process of solving initial value problems in differential equations . This article offers an immersive experience to newcomers intrigued by calculus’s wonders and experienced mathematicians looking for a comprehensive refresher.

Solving the Initial Value Problem 

To solve an initial value problem , integrate the given differential equation to find the general solution. Then, use the initial conditions provided to determine the specific constants of integration.

An initial value problem (IVP) is a specific problem in differential equations . Here is the formal definition. An initial value problem is a differential equation with a specified value of the unknown function at a given point in the domain of the solution.

More concretely, an initial value problem is typically written in the following form:

dy/dt = f(t, y) with y(t₀) = y₀

  • dy/dt = f(t, y) is the differential equation , which describes the rate of change of the function y with respect to the variable t .
  • t₀ is the given point in the domain , often time in many physical problems .
  • y(t₀) = y₀ is the initial condition , which specifies the value of the function y at the point t₀.

An initial value problem aims to find the function y(t) that satisfies both the differential equation and the initial condition . The solution y(t) to the IVP is not just any solution to the differential equation , but specifically, the one which passes through the point (t₀, y₀) on the (t, y) plane.

Because the solution of a differential equation is a family of functions, the initial condition is used to find the particular solution that satisfies this condition. This differentiates an initial value problem from a boundary value problem , where conditions are specified at multiple points or boundaries.

Solve the IVP y’ = 1 + y^2, y(0) = 0 .

This is a standard form of a first-order non-linear differential equation known as the Riccati equation. The general solution is y = tan(t + C) .

Applying the initial condition y(0) = 0, we get:

0 = tan(0 + C)

The solution to the IVP is then y = tan(t) .

Generic example of solving initial value problem

According to the Existence and Uniqueness Theorem for ordinary differential equations (ODEs) , if the function f and its partial derivative with respect to y are continuous in some region of the (t, y) -plane that includes the initial condition (t₀, y₀) , then there exists a unique solution y(t) to the IVP in some interval about t = t₀ .

In other words, given certain conditions, we are guaranteed to find exactly one solution to the IVP that satisfies both the differential equation and the initial condition .

If a solution exists, it will be a function that is at least once differentiable (since it must satisfy the given ODE ) and, therefore, continuous . The solution will also be differentiable as many times as the order of the ODE .

Small changes in the initial conditions can result in drastically different solutions to an IVP . This is often called “ sensitive dependence on initial conditions ,” a characteristic feature of chaotic systems .

The Existence and Uniqueness Theorem only guarantees a solution in a small interval around the initial point t₀ . This is called a local solution . However, under certain circumstances, a solution might extend to all real numbers, providing a global solution . The nature of the function f and the differential equation itself can limit the interval of the solution.

For higher-order ODEs , you will have more than one initial condition. For an n-th order ODE , you’ll need n initial conditions to find a unique solution.

The solution to an IVP may behave differently as it approaches the boundaries of its validity interval. For example, it might diverge to infinity , converge to a finite value , oscillate , or exhibit other behaviors.

The general solution of an ODE is a family of functions that represent all solutions to the ODE . By applying the initial condition(s), we narrow this family down to one solution that satisfies the IVP .

Applications 

Solving initial value problems (IVPs) is fundamental in many fields, from pure mathematics to physics , engineering , economics , and beyond. Finding a specific solution to a differential equation given initial conditions is essential in modeling and understanding various systems and phenomena. Here are some examples:

IVPs are used extensively in physics . For example, in classical mechanics , the motion of an object under a force is determined by solving an IVP using Newton’s second law ( F=ma , a second-order differential equation). The initial position and velocity (the initial conditions) are used to find a unique solution that describes the object’s motion .

IVPs appear in many engineering problems. For instance, in electrical engineering , they are used to describe the behavior of circuits containing capacitors and inductors . In civil engineering , they are used to model the stress and strain in structures over time.

In biology , IVPs are used to model populations’ growth and decay , the spread of diseases , and various biological processes such as drug dosage and response in pharmacokinetics .

Differential equations model various economic processes , such as capital growth over time. Solving the accompanying IVP gives a specific solution that models a particular scenario, given the initial economic conditions.

IVPs are used to model the change in populations of species , pollution levels in a particular area, and the diffusion of heat in the atmosphere and oceans.

In computer graphics, IVPs are used in physics-based animation to make objects move realistically. They’re also used in machine learning algorithms, like neural differential equations , to optimize parameters.

In control theory , IVPs describe the time evolution of systems. Given an initial state , control inputs are designed to achieve a desired state.

Solve the IVP y’ = 2y, y(0) = 1 .

The given differential equation is separable. Separating variables and integrating, we get:

∫dy/y = ∫2 dt

ln|y| = 2t + C

y = $e^{(2t+C)}$

= $e^C  * e^{(2t)}$

Now, apply the initial condition y(0) = 1 :

1 = $e^C * e^{(2*0)}$

The solution to the IVP is y = e^(2t) .

Solve the IVP y’ = -3y, y(0) = 2 .

The general solution is y = Ce^(-3t) . Apply the initial condition y(0) = 2 to get:

2 = C $e^{(-3*0)}$

2 = C $e^0$

So, C = 2, and the solution to the IVP is y = 2e^(-3t) .

initial value problem solution y equals 2 times exponential power minus 2 times t

Solve the IVP y’ = y^2, y(1) = 1 .

This is also a separable differential equation. We separate variables and integrate them to get:

∫$dy/y^2$ = ∫dt,

1/y = t + C.

Applying the initial condition y(1) = 1, we find C = -1. So the solution to the IVP is -1/y = t – 1 , or y = -1/(t – 1).

Solve the IVP y” – y = 0, y(0) = 0, y'(0) = 1 .

This is a second-order linear differential equation. The general solution is y = A sin(t) + B cos(t) .

The first initial condition y(0) = 0 gives us:

0 = A 0 + B 1

The second initial condition y'(0) = 1 gives us:

1 = A cos(0) + B*0

The solution to the IVP is y = sin(t) .

Solve the IVP y” + y = 0, y(0) = 1, y'(0) = 0 .

This is also a second-order linear differential equation. The general solution is y = A sin(t) + B cos(t) .

The first initial condition y(0) = 1 gives us:

1 = A 0 + B 1

The second initial condition y'(0) = 0 gives us:

0 = A cos(0) – B*0

The solution to the IVP is y = cos(t) .

Solve the IVP y” = 9y, y(0) = 1, y'(0) = 3.

The differential equation can be rewritten as y” – 9y = 0. The general solution is y = A $ e^{(3t)} + B e^{(-3t)}$ .

1 = A $e^{(30)}$ + B $e^{(-30)}$

So, A + B = 1.

The second initial condition y'(0) = 3 gives us:

3 = 3A $e^{30} $ – 3B $e^{-30}$

= 3A – 3B

So, A – B = 1.

We get A = 1 and B = 0 to solve these two simultaneous equations. So, the solution to the IVP is y = $e^{(3t)}$ .

Solve the IVP y” + 4y = 0, y(0) = 0, y'(0) = 2 .

The differential equation is a standard form of a second-order homogeneous differential equation. The general solution is y = A sin(2t) + B cos(2t) .

The second initial condition y'(0) = 2 gives us:

2 = 2A cos(0) – B*0

The solution to the IVP is y = sin(2t) .

initial value problem solution y equals sin2t

  • Pre Calculus
  • Probability
  • Sets & Set Theory
  • Trigonometry

how to solve the initial value problem

Wait, fellow math enthusiast!

To find out more about why you should hire a math tutor, just click on the "Read More" button at the right!

How To Solve An Initial Value Problem (5 Key Steps To Take)

Initial value problems come up often in calculus, physics, and other subjects.  You can solve some of them with straightforward antiderivatives, while others will require you to solve a challenging ordinary differential equation.

So, how do you solve an initial value problem?  First, write out the differential equation. Next, find the starting condition (initial value). Then, isolate the derivative in the equation. Now, take the antiderivative on both sides of the equation. Finally, use the starting condition (initial value) to find the constant in the antiderivative.

Of course, we can solve initial value problems in “layers”.  For example, in physics, we often start with acceleration (due to gravity) and find the height function for an object, given its starting height and speed.

In this article, we’ll talk about initial value problems and what they are.  We’ll also look at the steps you can take to solve them, along with some examples to show how it’s done in practice.

Let’s get started.

What Is An Initial Value Problem?

An initial value problem (IVP) uses calculus, a differential equation, and a starting condition to find a function that models the problem.  For example, a common IVP in physics is to find an equation for the height of a falling object, given its starting height and velocity.

An initial value problem involves an ordinary differential equation (ODE).  An ordinary differential equation is made up of one or more functions and their derivatives .

differential equation

Now that we know what an initial value problem is, let’s find out how to solve one.

How To Solve An Initial Value Problem

There are five key steps you can take to help you solve an initial value problem.

  • 1. Write out the equation – if the IVP is given as a word problem, you might have to translate into an equation.  Sometimes, the equation will be given.  You may need to introduce variables to write your equation.
  • 2. Identify the starting condition – an IVP always has a starting condition (an initial value for the function).  Sometimes, the starting condition will be given.  Other times, you might have to use context to figure it out.
  • 3. Isolate the derivative – before you can take an antiderivative (next step), you need to isolate the derivative function.  This is just like solving for any other variable in an equation.
  • 4. Take the antiderivative – you will need to know the rules for taking antiderivatives of various types of functions.  This can get more complicated for advanced ordinary differential equations.
  • 5. Use the starting condition – taking the antiderivative in the previous step will introduce an unknown constant.  We use the starting condition in our equation to find the value of the constant.

It will help to see these steps applied to a real problem, so let’s take a look at some now.

Example 1: How To Solve An Initial Value Problem

Let’s say that you are somewhere due south of Boston.  You start driving south at a constant speed of 60 miles per hour.

car driving

After 3.2 hours, you are 220 miles south of Boston.  How far from Boston were you after 1.5 hours?

To solve this problem, we’ll take the 5 steps listed above.

Step 1: write out the equation.

We are not given any variables, so we will need our own.  Let’s use S for the speed of the car, P for the position of the car, and t for the time (in hours).

The equation tells us the speed S of the vehicle at a given time t.  So, we have the equation:

This suggests that the speed of the car is a constant 60 (miles per hour).

Remember that speed is the derivative of position, meaning S(t) = P’(t).  So, we can rewrite the equation as:

Step 2: identify the starting condition.

We are given that the car is 220 miles south of Boston after 3.2 hours.  This implies a position of P = 220 miles at a time t = 3.2 hours.

As an ordered pair, we can write this as (3.2, 220).

Step 3: isolate the derivative.

Since the derivative P’(t) is already isolated in the equation P’(t) = 60, we don’t need to do anything here.

Step 4: take the antiderivative.

This is not too difficult, since the antiderivative of a constant c is ct.  Taking the antiderivative on both sides of our equation gives us:

  • ∫P’(t)dt = ∫60dt
  • P(t) = 60t + K

where K is an unknown constant.

Step 5: use the starting condition.

Now, we use the starting condition to solve for the constant K.  Remember from Step 2 that our starting condition was P = 220 at t = 3.2.

Using these values in the equation we found in Step 4 gives us:

  • P(3.2) = 60(3.2) + K
  • 220 = 192 + K
  • 220 – 192 = K

So, the entire equation is P(t) = 60t + 28.  This tells us how many miles (south) the car is from Boston at t hours.

line 60t + 28 position

For example, at time t = 0, the car is P(0) = 60(0) + 28 = 28 miles south of Boston (that is, you started 28 miles south of Boston).

At time t = 1.5 hours, the car is P(1.5) = 60(1.5) + 28 = 90 + 28 = 118 miles south of Boston.

Example 2: How To Solve An Initial Value Problem

Let’s try a classic initial value problem from physics.  This one has two “layers”, and two antiderivatives must be taken: the first to go from acceleration to velocity, and the second to go from velocity to position.

A ball is thrown downward from the top of a building.  The starting velocity is -20 feet per second (the negative denotes that it is falling, or moving towards Earth).  The starting height is 500 feet.

falling ball

The acceleration due to gravity is -32 feet per second.  What is the height of the ball at 2.5 seconds?

We are not given any variables, so we will need our own.  Let’s use A for the acceleration of the ball, V for the velocity of the ball, P for the position (height) of the ball, and t for the time (in seconds).

The equation tells us the acceleration A of the ball at a given time t.  So, we have the equation:

This suggests that the acceleration of the ball is a constant -32 (feet per second, per second).  This is the acceleration due to gravity.

Remember that acceleration is the derivative of velocity, meaning A(t) = V’(t).  So, we can rewrite the equation as:

  • V’(t) = -32

We are given that the starting velocity of the ball is -20 feet per second.  This implies a velocity of V = -20 feet per second at a time t = 0 seconds.

As an ordered pair, we can write this as (0, -20).

Since the derivative V’(t) is already isolated in the equation V’(t) = -32, we don’t need to do anything here.

  • ∫V’(t)dt = ∫-32dt
  • V(t) = -32t + K

Now, we use the starting condition to solve for the constant K.  Remember from Step 2 that our starting condition was V = -20 at t = 0.

  • P(t) = -32t + K
  • P(0) = 60(0) + K
  • -20 = 0 + K

So, the entire equation is V(t) = -32t – 20.  This tells us the velocity of the ball at t seconds.

However, we’re not done yet.  We want to find the position function, so we have to go through the steps again (this time, to find position from velocity).

The equation we just found tells us the velocity V of the ball at a given time t.  So, we have the equation:

  • V(t) = -32t – 20

Remember that velocity is the derivative of position, meaning V(t) = P’(t).  So, we can rewrite the equation as:

  • P’(t) = -32t – 20

We are given that the starting position of the ball is a height of 500 feet above ground.  This implies a position of P = 500 feet at a time t = 0 seconds.

As an ordered pair, we can write this as (0, 500).

Since the derivative P’(t) is already isolated in the equation P’(t) = -32t – 20, we don’t need to do anything here.

This is not too difficult, since the antiderivative of a constant c is ct, and the antiderivative of a linear term bt is bt 2 /2.  Taking the antiderivative on both sides of our equation gives us:

  • ∫P’(t)dt = ∫(-32t – 20)dt
  • P(t) = -32t 2 /2 – 20t + K
  • P(t) = -16t 2 – 20t + K

Now, we use the starting condition to solve for the constant K.  Remember from Step 2 that our starting condition was P = 500 at t = 0.

  • P(0) = -16(0) 2 – 20(0) + K
  • 500 = 0 – 0 + K

So, the entire equation is P(t) = -16t 2 – 20t + 500.  This tells us the position of the ball at t seconds.

parabola quadratic -16t2 - 20t + 500

The height of the ball at t = 2.5 seconds is given by:

  • P(t) = -16t 2 – 20t + 500
  • P(2.5) = -16(2.5) 2 – 20(2.5) + 500
  • P(2.5) = -16(6.25) – 50 + 500
  • P(2.5) = -100 + 450
  • P(2.5) = 350

The ball is at a height of 350 feet above ground at 2.5 seconds.

Now you know what an initial value problem is and how to solve one.  You also know the steps to take so that you have the right tools to solve the problem.

Velocity is used in other applications besides initial value problems – you can learn about what velocity is used for in this article.

I hope you found this article helpful.  If so, please share it with someone who can use the information.

Don’t forget to subscribe to my YouTube channel & get updates on new math videos!

JDM Educational Staff

Recent Posts

The New Digital SAT (3 Changes To Know About)

Have you heard the news? The SAT is changing in 2024. Yes, it’s true. The College Board, the creators of the SAT, are revamping the entire exam for spring of 2024. PSAT test takers will see the...

Percents (9 Examples Of Percents & Their Uses)

Percents are used all the time in everyday life to find the size of an increase or decrease and to calculate discounts in stores. You’ve probably used percentages before. “I got a 94% on the...

Library homepage

  • school Campus Bookshelves
  • menu_book Bookshelves
  • perm_media Learning Objects
  • login Login
  • how_to_reg Request Instructor Account
  • hub Instructor Commons
  • Download Page (PDF)
  • Download Full Book (PDF)
  • Periodic Table
  • Physics Constants
  • Scientific Calculator
  • Reference & Cite
  • Tools expand_more
  • Readability

selected template will load here

This action is not available.

Mathematics LibreTexts

7.2: Numerical Methods - Initial Value Problem

  • Last updated
  • Save as PDF
  • Page ID 96065

  • Jeffrey R. Chasnov
  • Hong Kong University of Science and Technology

We begin with the simple Euler method, then discuss the more sophisticated RungeKutta methods, and conclude with the Runge-Kutta-Fehlberg method, as implemented in the MATLAB function ode45.m. Our differential equations are for \(x=\) \(x(t)\) , where the time \(t\) is the independent variable, and we will make use of the notation \(\dot{x}=d x / d t\) . This notation is still widely used by physicists and descends directly from the notation originally used by Newton.

7.2.1. Euler method

The Euler method is the most straightforward method to integrate a differential equation. Consider the first-order differential equation

\[\dot{x}=f(t, x), \nonumber \]

with the initial condition \(x(0)=x_{0}\) . Define \(t_{n}=n \Delta t\) and \(x_{n}=x\left(t_{n}\right)\) . A Taylor series expansion of \(x_{n+1}\) results in

\[\begin{aligned} x_{n+1} &=x\left(t_{n}+\Delta t\right) \\ &=x\left(t_{n}\right)+\Delta t \dot{x}\left(t_{n}\right)+\mathrm{O}\left(\Delta t^{2}\right) \\ &=x\left(t_{n}\right)+\Delta t f\left(t_{n}, x_{n}\right)+\mathrm{O}\left(\Delta t^{2}\right) \end{aligned} \nonumber \]

The Euler Method is therefore written as

\[x_{n+1}=x\left(t_{n}\right)+\Delta t f\left(t_{n}, x_{n}\right) \nonumber \]

We say that the Euler method steps forward in time using a time-step \(\Delta t\) , starting from the initial value \(x_{0}=x(0)\) . The local error of the Euler Method is \(\mathrm{O}\left(\Delta t^{2}\right)\) . The global error, however, incurred when integrating to a time \(T\) , is a factor of \(1 / \Delta t\) larger and is given by \(\mathrm{O}(\Delta t)\) . It is therefore customary to call the Euler Method a first-order method.

7.2.2. Modified Euler method

This method is of a type that is called a predictor-corrector method. It is also the first of what are Runge-Kutta methods. As before, we want to solve (7.3). The idea is to average the value of \(\dot{x}\) at the beginning and end of the time step. That is, we would like to modify the Euler method and write

\[x_{n+1}=x_{n}+\frac{1}{2} \Delta t\left(f\left(t_{n}, x_{n}\right)+f\left(t_{n}+\Delta t, x_{n+1}\right)\right) \nonumber \]

The obvious problem with this formula is that the unknown value \(x_{n+1}\) appears on the right-hand-side. We can, however, estimate this value, in what is called the predictor step. For the predictor step, we use the Euler method to find

\[x_{n+1}^{p}=x_{n}+\Delta t f\left(t_{n}, x_{n}\right) \nonumber \]

The corrector step then becomes

\[x_{n+1}=x_{n}+\frac{1}{2} \Delta t\left(f\left(t_{n}, x_{n}\right)+f\left(t_{n}+\Delta t, x_{n+1}^{p}\right)\right) \nonumber \]

The Modified Euler Method can be rewritten in the following form that we will later identify as a Runge-Kutta method:

\[\begin{aligned} k_{1} &=\Delta t f\left(t_{n}, x_{n}\right) \\ k_{2} &=\Delta t f\left(t_{n}+\Delta t, x_{n}+k_{1}\right) \\ x_{n+1} &=x_{n}+\frac{1}{2}\left(k_{1}+k_{2}\right) \end{aligned} \nonumber \]

7.2.3.  Second-order Runge-Kutta methods

We now derive all second-order Runge-Kutta methods. Higher-order methods can be similarly derived, but require substantially more algebra.

We consider the differential equation given by (7.3). A general second-order Runge-Kutta method may be written in the form

\[\begin{aligned} k_{1} &=\Delta t f\left(t_{n}, x_{n}\right) \\ k_{2} &=\Delta t f\left(t_{n}+\alpha \Delta t, x_{n}+\beta k_{1}\right) \\ x_{n+1} &=x_{n}+a k_{1}+b k_{2} \end{aligned} \nonumber \]

with \(\alpha, \beta, a\) and \(b\) constants that define the particular second-order Runge-Kutta method. These constants are to be constrained by setting the local error of the second-order Runge-Kutta method to be \(\mathrm{O}\left(\Delta t^{3}\right)\) . Intuitively, we might guess that two of the constraints will be \(a+b=1\) and \(\alpha=\beta\) .

We compute the Taylor series of \(x_{n+1}\) directly, and from the Runge-Kutta method, and require them to be the same to order \(\Delta t^{2}\) . First, we compute the Taylor series of \(x_{n+1}\) . We have

\[\begin{aligned} x_{n+1} &=x\left(t_{n}+\Delta t\right) \\ &=x\left(t_{n}\right)+\Delta t \dot{x}\left(t_{n}\right)+\frac{1}{2}(\Delta t)^{2} \ddot{x}\left(t_{n}\right)+\mathrm{O}\left(\Delta t^{3}\right) \end{aligned} \nonumber \]

\[\dot{x}\left(t_{n}\right)=f\left(t_{n}, x_{n}\right) . \nonumber \]

The second derivative is more complicated and requires partial derivatives. We have

\[\begin{aligned} \ddot{x}\left(t_{n}\right) &\left.=\frac{d}{d t} f(t, x(t))\right]_{t=t_{n}} \\ &=f_{t}\left(t_{n}, x_{n}\right)+\dot{x}\left(t_{n}\right) f_{x}\left(t_{n}, x_{n}\right) \\ &=f_{t}\left(t_{n}, x_{n}\right)+f\left(t_{n}, x_{n}\right) f_{x}\left(t_{n}, x_{n}\right) \end{aligned} \nonumber \]

\[x_{n+1}=x_{n}+\Delta t f\left(t_{n}, x_{n}\right)+\frac{1}{2}(\Delta t)^{2}\left(f_{t}\left(t_{n}, x_{n}\right)+f\left(t_{n}, x_{n}\right) f_{x}\left(t_{n}, x_{n}\right)\right) \nonumber \]

Second, we compute \(x_{n+1}\) from the Runge-Kutta method given by (7.5). Substituting in \(k_{1}\) and \(k_{2}\) , we have

\[x_{n+1}=x_{n}+a \Delta t f\left(t_{n}, x_{n}\right)+b \Delta t f\left(t_{n}+\alpha \Delta t, x_{n}+\beta \Delta t f\left(t_{n}, x_{n}\right)\right) . \nonumber \]

We Taylor series expand using

\[\begin{aligned} f\left(t_{n}+\alpha \Delta t, x_{n}+\beta \Delta t f\left(t_{n}, x_{n}\right)\right) & \\ =f\left(t_{n}, x_{n}\right)+\alpha \Delta t f_{t}\left(t_{n}, x_{n}\right)+\beta \Delta t f\left(t_{n}, x_{n}\right) f_{x}\left(t_{n}, x_{n}\right)+\mathrm{O}\left(\Delta t^{2}\right) \end{aligned} \nonumber \]

The Runge-Kutta formula is therefore

\[\begin{aligned} x_{n+1}=x_{n}+(a+b) & \Delta t f\left(t_{n}, x_{n}\right) \\ &+(\Delta t)^{2}\left(\alpha b f_{t}\left(t_{n}, x_{n}\right)+\beta b f\left(t_{n}, x_{n}\right) f_{x}\left(t_{n}, x_{n}\right)\right)+\mathrm{O}\left(\Delta t^{3}\right) \end{aligned} \nonumber \]

Comparing (7.6) and (7.7), we find

\[\begin{aligned} a+b &=1 \\ \alpha b &=1 / 2 \\ \beta b &=1 / 2 \end{aligned} \nonumber \]

There are three equations for four parameters, and there exists a family of secondorder Runge-Kutta methods.

The Modified Euler Method given by (7.4) corresponds to \(\alpha=\beta=1\) and \(a=\) \(b=1 / 2\) . Another second-order Runge-Kutta method, called the Midpoint Method, corresponds to \(\alpha=\beta=1 / 2, a=0\) and \(b=1 .\) This method is written as

\[\begin{aligned} k_{1} &=\Delta t f\left(t_{n}, x_{n}\right) \\ k_{2} &=\Delta t f\left(t_{n}+\frac{1}{2} \Delta t, x_{n}+\frac{1}{2} k_{1}\right) \\ x_{n+1} &=x_{n}+k_{2} \end{aligned} \nonumber \]

7.2.4.  Higher-order Runge-Kutta methods

The general second-order Runge-Kutta method was given by (7.5). The general form of the third-order method is given by

\[\begin{aligned} k_{1} &=\Delta t f\left(t_{n}, x_{n}\right) \\ k_{2} &=\Delta t f\left(t_{n}+\alpha \Delta t, x_{n}+\beta k_{1}\right) \\ k_{3} &=\Delta t f\left(t_{n}+\gamma \Delta t, x_{n}+\delta k_{1}+\epsilon k_{2}\right) \\ x_{n+1} &=x_{n}+a k_{1}+b k_{2}+c k_{3} \end{aligned} \nonumber \]

The following constraints on the constants can be guessed: \(\alpha=\beta, \gamma=\delta+\epsilon\) , and \(a+b+c=1\) . Remaining constraints need to be derived.

The fourth-order method has a \(k_{1}, k_{2}, k_{3}\) and \(k_{4}\) . The fifth-order method requires up to \(k_{6}\) . The table below gives the order of the method and the number of stages required.

Because of the jump in the number of stages required between the fourth-order and fifth-order method, the fourth-order Runge-Kutta method has some appeal. The general fourth-order method starts with 13 constants, and one then finds 11 constraints. A particularly simple fourth-order method that has been widely used is given by

\[\begin{aligned} k_{1} &=\Delta t f\left(t_{n}, x_{n}\right) \\ k_{2} &=\Delta t f\left(t_{n}+\frac{1}{2} \Delta t, x_{n}+\frac{1}{2} k_{1}\right) \\ k_{3} &=\Delta t f\left(t_{n}+\frac{1}{2} \Delta t, x_{n}+\frac{1}{2} k_{2}\right) \\ k_{4} &=\Delta t f\left(t_{n}+\Delta t, x_{n}+k_{3}\right) \\ x_{n+1} &=x_{n}+\frac{1}{6}\left(k_{1}+2 k_{2}+2 k_{3}+k_{4}\right) \end{aligned} \nonumber \]

7.2.5.  Adaptive Runge-Kutta Methods

As in adaptive integration, it is useful to devise an ode integrator that automatically finds the appropriate \(\Delta t\) . The Dormand-Prince Method, which is implemented in MATLAB’s ode45.m, finds the appropriate step size by comparing the results of a fifth-order and fourth-order method. It requires six function evaluations per time step, and constructs both a fifth-order and a fourth-order method from these function evaluations.

Suppose the fifth-order method finds \(x_{n+1}\) with local error \(\mathrm{O}\left(\Delta t^{6}\right)\) , and the fourth-order method finds \(x_{n+1}^{\prime}\) with local error \(\mathrm{O}\left(\Delta t^{5}\right)\) . Let \(\varepsilon\) be the desired error tolerance of the method, and let \(e\) be the actual error. We can estimate \(e\) from the difference between the fifth-and fourth-order methods; that is,

\[e=\left|x_{n+1}-x_{n+1}^{\prime}\right| \nonumber \]

Now \(e\) is of \(\mathrm{O}\left(\Delta t^{5}\right)\) , where \(\Delta t\) is the step size taken. Let \(\Delta \tau\) be the estimated step size required to get the desired error \(\varepsilon\) . Then we have

\[e / \varepsilon=(\Delta t)^{5} /(\Delta \tau)^{5} \nonumber \]

or solving for \(\Delta \tau\) ,

\[\Delta \tau=\Delta t\left(\frac{\varepsilon}{e}\right)^{1 / 5} \nonumber \]

On the one hand, if \(e<\varepsilon\) , then we accept \(x_{n+1}\) and do the next time step using the larger value of \(\Delta \tau\) . On the other hand, if \(e>\varepsilon\) , then we reject the integration step and redo the time step using the smaller value of \(\Delta \tau\) . In practice, one usually increases the time step slightly less and decreases the time step slightly more to prevent the waste of too many failed time steps.

7.2.6. System of differential equations

Our numerical methods can be easily adapted to solve higher-order differential equations, or equivalently, a system of differential equations. First, we show how a second-order differential equation can be reduced to two first-order equations. Consider

\[\ddot{x}=f(t, x, \dot{x}) . \nonumber \]

This second-order equation can be rewritten as two first-order equations by defining \(u=\dot{x} .\) We then have the system

\[\begin{aligned} &\dot{x}=u, \\ &\dot{u}=f(t, x, u) . \end{aligned} \nonumber \]

This trick also works for higher-order equation. For another example, the thirdorder equation

\[\dddot x=f(t, x, \dot{x}, \ddot{x}), \nonumber \]

can be written as

\[\begin{aligned} &\dot{x}=u \\ &\dot{u}=v \\ &\dot{v}=f(t, x, u, v) . \end{aligned} \nonumber \]

Now, we show how to generalize Runge-Kutta methods to a system of differential equations. As an example, consider the following system of two odes,

\[\begin{aligned} &\dot{x}=f(t, x, y), \\ &\dot{y}=g(t, x, y), \end{aligned} \nonumber \]

with the initial conditions \(x(0)=x_{0}\) and \(y(0)=y_{0}\) . The generalization of the commonly used fourth-order Runge-Kutta method would be

\[\begin{aligned} k_{1} &=\Delta t f\left(t_{n}, x_{n}, y_{n}\right) \\ l_{1} &=\Delta t g\left(t_{n}, x_{n}, y_{n}\right) \\ k_{2} &=\Delta t f\left(t_{n}+\frac{1}{2} \Delta t, x_{n}+\frac{1}{2} k_{1}, y_{n}+\frac{1}{2} l_{1}\right) \\ l_{2} &=\Delta t g\left(t_{n}+\frac{1}{2} \Delta t, x_{n}+\frac{1}{2} k_{1}, y_{n}+\frac{1}{2} l_{1}\right) \\ y_{3} &=\Delta t f\left(t_{n}+\frac{1}{2} \Delta t, x_{n}+\frac{1}{2} k_{2}, y_{n}+\frac{1}{2} l_{2}\right) \\ l_{3} &=\Delta t g\left(t_{n}+\frac{1}{2} \Delta t, x_{n}+\frac{1}{2} k_{2}, y_{n}+\frac{1}{2} l_{2}\right) \\ y_{n+1} &=y_{n}+\frac{1}{6}\left(l_{1}+2 l_{2}+2 l_{3}+l_{4}\right) \\ k_{4} &=\Delta t f\left(t_{n}+\Delta t, x_{n}+k_{3}, y_{n}+l_{3}\right) \\ l_{4} &=\Delta t g\left(t_{n}+\Delta t, x_{n}+k_{3}, y_{n}+l_{3}\right) \\ &=x_{n}+\frac{1}{6}\left(k_{1}+2 k_{2}+2 k_{3}+k_{4}\right) \\ &=\Delta \end{aligned} \nonumber \]

IMAGES

  1. Initial Value Problem

    how to solve the initial value problem

  2. Solving an initial value problem (calculus)

    how to solve the initial value problem

  3. Calculus Solving a Differential Equation an Initial Value Problem

    how to solve the initial value problem

  4. solve the initial value problem first order differential equation

    how to solve the initial value problem

  5. 5.5-5 Solving a simple initial value problem using a substitution

    how to solve the initial value problem

  6. ODE

    how to solve the initial value problem

VIDEO

  1. Solve the initial value problem

  2. Solve the initial value problem

  3. L4

  4. Calculus: Solve Initial Value Problem

  5. LAPLACE TRANSFORM: Solve initial value problem (IVP) using Laplace transform

  6. ODE Solve initial value problem (e^2y

COMMENTS

  1. 8.1: Basics of Differential Equations

    Example \(\PageIndex{5}\): Solving an Initial-value Problem. Solve the following initial-value problem: \[ y′=3e^x+x^2−4,y(0)=5. \nonumber \] Solution. The first step in solving this initial-value problem is to find a general family of solutions. To do this, we find an antiderivative of both sides of the differential equation

  2. Initial Value Problem

    This calculus video tutorial explains how to solve the initial value problem as it relates to separable differential equations.Antiderivatives: ...

  3. Initial-Value Problems

    is an example of an initial-value problem. Since the solutions of the differential equation are y = 2x3 +C y = 2 x 3 + C, to find a function y y that also satisfies the initial condition, we need to find C C such that y(1) = 2(1)3 +C =5 y ( 1) = 2 ( 1) 3 + C = 5. From this equation, we see that C = 3 C = 3, and we conclude that y= 2x3 +3 y = 2 ...

  4. Initial-Value Problems

    A differential equation together with one or more initial values is called an initial-value problem. The general rule is that the number of initial values needed for an initial-value problem is equal to the order of the differential equation. For example, if we have the differential equation y′ = 2x y ′ = 2 x, then y(3)= 7 y ( 3) = 7 is an ...

  5. Solving linear differential equations initial value problems

    An initial value problem (IVP) is a differential equations problem in which we're asked to use some given initial condition, or set of conditions, in order to find the particular solution to the differential equation. Solving initial value problems. In order to solve an initial value problem for a first order differential equation, we'll

  6. How to solve initial value problems

    Problems that provide you with one or more initial conditions are called Initial Value Problems. Initial conditions take what would otherwise be an entire rainbow of possible solutions, and whittles them down to one specific solution. Remember that the basic idea behind Initial Value Problems is that, once you differentiate a function, you lose ...

  7. Solving Initial Value Problems (IVPs): A Comprehensive Guide

    Let's look at an example of how we will verify and find a solution to an initial value problem given an ordinary differential equation. Verify that the function y = c 1 e 2 x + c 2 e − 2 x is a solution of the differential equation y ′ ′ − 4 y = 0. Then find a solution of the second-order IVP consisting of the differential equation ...

  8. Initial-Value Problems

    Possible Answers: Correct answer: Explanation: So this is a separable differential equation with a given initial value. To start off, gather all of the like variables on separate sides. Then integrate, and make sure to add a constant at the end. To solve for y, take the natural log, ln, of both sides.

  9. How to solve linear differential equations initial value problems

    If we want to find a specific value for C, and therefore a specific solution to the linear differential equation, then we'll need an initial condition, like f(0)=a. Given this additional piece of information, we'll be able to find a value for C and solve for the specific solution.

  10. initial value problem

    Solve problems from Pre Algebra to Calculus step-by-step . step-by-step. initial value problem. en. Related Symbolab blog posts. My Notebook, the Symbolab way. Math notebooks have been around for hundreds of years. You write down problems, solutions and notes to go back...

  11. Initial and Boundary Value Problems

    Such problems are traditionally called initial value problems (IVPs) because the system is assumed to start evolving from the fixed initial point (in this case, 0). The solution is required to have specific values at a pair of points, for example, and . These problems are known as boundary value problems (BVPs) because the points 0 and 1 are ...

  12. Solve Initial Value Problem-Definition, Application and Examples

    Solving initial value problems (IVPs) is an important concept in differential equations.Like the unique key that opens a specific door, an initial condition can unlock a unique solution to a differential equation.. As we dive into this article, we aim to unravel the mysterious process of solving initial value problems in differential equations.This article offers an immersive experience to ...

  13. Initial Value Problem (Initial Condition)

    Initial Value Example problem #2: Solve the following initial value problem: dy⁄dx = 9x2 - 4x + 5; y (-1) = 0. Step 1: Rewrite the equation, using algebra, to make integration possible (essentially you're just moving the "dx". dy ⁄ dx = 9x 2 - 4x + 5 →. dy = (9x 2 - 4x + 5) dx. Step 2: Integrate both sides of the differential ...

  14. Lecture # 24 || How to solve Initial Value Problem || IVP || ODE

    This video lecture is about the solution of an Initial Value Problem (IVP). Different examples are solved for complete understanding.

  15. Solving differential equation initial value problems with step

    In general, to solve the initial value problem, we'll follow these steps: 1. Make sure the forcing function is being shifted correctly, and identify the function being shifted. 2. Apply a Laplace transform to each part of the differential equation, substituting initial conditions to simplify. 3. Solve for Y(s). 4.

  16. How To Solve An Initial Value Problem (5 Key Steps To Take)

    To solve this problem, we'll take the 5 steps listed above. Step 1: write out the equation. We are not given any variables, so we will need our own. Let's use S for the speed of the car, P for the position of the car, and t for the time (in hours). The equation tells us the speed S of the vehicle at a given time t.

  17. Bi-level optimization operation strategy for CCHP microgrid with

    According to the characteristics of the compressed air energy storage system, NSGA-II is used to solve the output scheduling optimization problem in the lower level with economy, environmental protection and energy saving as the unobjective under the condition of determining the optimal storage initial value.

  18. Second-order nonhomogeneous differential equations initial value problems

    To solve an initial value problem for a second-order nonhomogeneous differential equation, we'll follow a very specific set of steps. We first find the complementary solution, then the particular solution, putting them together to find the general solution. Then we differentiate the general solution, plug the given initial conditions into the ...

  19. 7.2: Numerical Methods

    7.2.6. System of differential equations. Our numerical methods can be easily adapted to solve higher-order differential equations, or equivalently, a system of differential equations. First, we show how a second-order differential equation can be reduced to two first-order equations. Consider. ¨x = f(t, x, ˙x).

  20. Homogeneous differential equations initial value problems

    The only way to solve for these constants is with initial conditions. In a second-order homogeneous differential equations initial value problem, we'll usually be given one initial condition for the general solution, and a second initial condition for the derivative of the general solution.

  21. Solving initial value problems using laplace transforms

    To use a Laplace transform to solve a second-order nonhomogeneous differential equations initial value problem, we'll need to use a table of Laplace transforms or the definition of the Laplace transform to put the differential equation in terms of Y(s). Once we solve the resulting equation for Y(s),