Understand Differential Equations
 A differential equation relates one or more functions to their derivatives with respect to an independent variable.
 The highest order of the derivative determines the order of the differential equation.
 Differential equations are used to model growth, decay, and various phenomena, including physics applications.
Problem Statement
 Given the differential equation:
dy/dx=f(x)
 Initial condition:
$y(0)=0.5$
 We want to compute the values of
$y$
in the time interval
$[0,1.2]$.
STEP 1 – Create Dataset
 Create a dataset to insert the iteration number (n), time value (t), y value, y–exact value, and delta_t.
 The delta_t is the separation value.
 Display the equations to find the t(n+1) and y(n+1) values.
 Add the time interval and initial value to make the calculation easy.
STEP 2 – Apply Formula for Time Values & Yvalues
 Apply formulas to calculate the time values and yvalues.
 At the start of the iteration, n is 0, t is 0, and y is 5.
 Insert these values in Cells B5, C5, and D5Â respectively.
 Insert a formula to calculate the tvalues.
 Select Cell C6 and enter the formula below:
=C5+$G$5
 Press Enter.
 To find the yvalues:
 Select Cell D6 and enter the formula below:
=D5+(C5D5)*$G$5

 Press Enter to see the result.
STEP 3 – Fill Columns
 To fill the values in the n, t, and yÂ columns:
 To find the number of iterations (n), divide the time interval by the delta_t value.
 In this problem statement the iteration number (n) = (2/0.1) = 12.
 Fill the iteration column from 0 to 12.

 Select both Cells C6 & D6 and drag the Fill HandleÂ down.

 The t and y–values have been calculated.
STEP 4 – Plot Data
 To plot the t and y–values, select the range C4:D17.
 Go to the Insert tab and click on the Insert Scatter icon. A dropdown menu will appear.
 Select Scatter with Lines.
 As a result, a chart will display on the sheet.
 Change the chart title according to your preferences.
STEP 5 – Format Axis
 To format the axis of the graph:
 Double–click on the horizontal axis. It will open the Format Axis options on the right side of the sheet.
 Set the Minimum value to 0 and Maximum value to 1.2 in the Bounds section.
 Press Enter.

 Double–click on the vertical axis.
 Set the Minimum value to 0.3 and Maximum value to 0.65 in the Bounds section.
 Press Enter.
 The graph will look like the picture below:
Read More: How to Solve an Equation for X When Y is Given in ExcelÂ
STEP 6 – Find the Exact Solution
 The exact solution of the differential equation is y = 1 + t + 1.5*exp(t).
 Select Cell E5 and enter the formula below:
=1+C5+1.5*EXP(C5)
 Press Enter and drag the Fill HandleÂ down.
 The yvalues of the exact solution have been calculated.
STEP 7 – Plot the Exact Solution on the Same Chart
 To compare the yvalues of the exact solution with the numerical values, plot them on the same chart.
 Right–click on the chart to open the menu.
 Click on the Select DataÂ option.
 In the Select Data Source dialog box, click on Add.
 Insert the Series X and Y values in the Edit SeriesÂ box.
 Click OK to get the plot of the exact solution.
Read More: How to Solve 2 Equations with 2 Unknowns in Excel
Final Output
 If the delta_t value in Cell G5 is changed, the whole dataset will automatically update and show the solution for the updated delta_tÂ value.
 The graphs will also update automatically.
Read More: How to Solve Polynomial Equation in Excel
Download Practice Book
You can download the practice workbook from here:
Related Articles
 How to Solve for x in ExcelÂ
 How to Solve Algebraic Equations with Multiple Variables
 How to Solve System of Equations in Excel
 How to Solve Simultaneous Equations in Excel
 How to Solve Exponential Equation in Excel
 How to Solve Cubic Equation in Excel
 How to Solve Colebrook Equation in Excel
 How to Solve Quadratic Equation in Excel VBA
<< Go Back to Excel Solve Equation  Excel Solver ExamplesÂ Â Solver in ExcelÂ Â Learn Excel
Get FREE Advanced Excel Exercises with Solutions!