From charlesreid1

(Created page with "=Background= Setup of basic equation describing a simple inductor circuit - how does an inductor work, what is an inductor used for, how can we model the inductor Inductor c...")
 
Line 12: Line 12:


Different right-hand sides, different time steps
Different right-hand sides, different time steps
=Content=
==Introduction==
Today we will be using a spreadsheet program to implement Euler’s Method and solve a differential equation. Euler’s Method ties together the concepts of numerical integration and differential equations. We will implement Euler’s Method to solve for the current in the following circuit:
This circuit is described in Example 4 of Section 9.5 of the Stewart Calculus textbook.
==Euler's Method==
We can use Euler’s Method to solve a differential equation of the general form:
<math>
\frac{dy}{dt} = F(t,y)
</math>
We start by chopping up the time domain into a set of steps of size <math>\Delta</math>. We will evaluate the solution, and the right‐hand side of the equation, at each timestep.
Start by turning the derivative on the left‐hand side into a finite difference quotient:
<math>
\frac{dy}{dt} \approx \frac{\Delta y}{\Delta t}
</math>
Next, using the fact that <math>\Delta y = y(t+\Delta t)-y(t)</math>, we can write a relationship between the solution at a given time step <math>t_i</math>, denoted <math>y_i = y(t_i)</math>, and the solution at the next timestep <math>t_{i+1} = t_i + \Delta t</math>, denoted <math>y_{i+1}</math>:
<math>
y_{i+1} = y_i + \Delta t \left( F(t,y) \right)
</math>

Revision as of 17:45, 8 May 2016

Background

Setup of basic equation describing a simple inductor circuit - how does an inductor work, what is an inductor used for, how can we model the inductor

Inductor coil in electrical circuit: solving the differential equation for current

Setting up the use of Simpson's Rule to implement Euler's Method and integrate Right Hand side, with Delta x instead of Delta t.

Electrical circuit

Solving a differential equation

Different right-hand sides, different time steps

Content

Introduction

Today we will be using a spreadsheet program to implement Euler’s Method and solve a differential equation. Euler’s Method ties together the concepts of numerical integration and differential equations. We will implement Euler’s Method to solve for the current in the following circuit:

This circuit is described in Example 4 of Section 9.5 of the Stewart Calculus textbook.

Euler's Method

We can use Euler’s Method to solve a differential equation of the general form:

$ \frac{dy}{dt} = F(t,y) $

We start by chopping up the time domain into a set of steps of size $ \Delta $. We will evaluate the solution, and the right‐hand side of the equation, at each timestep.

Start by turning the derivative on the left‐hand side into a finite difference quotient:

$ \frac{dy}{dt} \approx \frac{\Delta y}{\Delta t} $

Next, using the fact that $ \Delta y = y(t+\Delta t)-y(t) $, we can write a relationship between the solution at a given time step $ t_i $, denoted $ y_i = y(t_i) $, and the solution at the next timestep $ t_{i+1} = t_i + \Delta t $, denoted $ y_{i+1} $:

$ y_{i+1} = y_i + \Delta t \left( F(t,y) \right) $