Lecture

23
Differential Equations Chapter 8

description

DE lecture note

Transcript of Lecture

Chapter 8

Differential Equations

What is a Differential Equation? An equation that defines a relationship between an unknown function and one or more of its derivatives can originate from either geometric or physical problem the quantity being differentiated, is called the dependent variable the quantity with respect to which the dependent variable is differentiated is called the independent variable.

What is a Differential Equation? EXAMPLE

of a DE

Dependant Variable

dV c g V dt mIndependant Variable

Differential Equation : ODE vs. PDE when a function involves one independent variable, the equation is called an Ordinary differential equation

(ODE)

dy f ( x, y ) dx y = dependent variable, x = independent variable

Differential Equation : ODE vs. PDE When a function involves two or more independent variable, itis called

Partial differential equation (PDE)dy f ( x1 , x2 , y ) dx1

y = dependent variable, x1, x2 = independent variable

Differential Equation : Order Differential equations are also classified as to their order - The order of the differential equation is equivalent to the order of the highest derivative in the equation Example

dV c g V dt m

Is a first order differential equation since the highest derivative in The equation is a first order

Differential Equation : Linear vs Non-linear Differential Equations may be linear or non-linear An nth order DE is linear if: there are no products or non linear functions of the dependent variable, y and its derivative in the function on the right of the equation

Example of a linear ODEf(x,y) = 3xy + y Example of a non linear ODE

f(x,y) = 2yy + 3xy

Differential Equation : IVP vs. BVPThere are two types of problems in solving a Differential Equation Initial Value Problem Boundary Value Problem

Differential Equation : IVP vs. BVP Initial Value Problem Example : Solve

dy 2 4x y dxfrom x=1 to x=2 given y(1)=1All the conditions are specified at the same value of the independent variable

Differential Equation : IVP vs. BVPBoundary Value Problem Example:Solve

y 1 y 8 2 x 42

given y(0)=0, y(10)=0Conditions occur at different values of the independent variable

What is the solution to Ordinary Differential Equation problems? Given an ODE

dy x2 x y dx

Which passes through an initial point ( x0,y0) or y(x0) = y0-- What we want to do is to find the function y that satisfies this Differential equation with this initial condition

What is the solution to Ordinary Differential Equation problems? In other words, we need to integrate this differential equation in order to solve.

Unfortunately, not all of the differential equations are easy to solve analytically

What is the solution to Ordinary Differential Equation problems?We cannot use the techniques we have learned for numerical integration, like the Trapezoidal Rule or the Simpsons Rules because these techniques assumed that you already know the function y.

In most differential equation problems, we do not know the function.

Differential Equations There are various methods of solving a DEFinite Difference Method ** Finite Element Method

Monte Carlo MethodSpectral Method Variational Method

** All finite difference formulae can be derived from theTaylor Series representation of a function

Ordinary Differential Equation Two methods can be employed in solving the

first order ordinary differential equations for the initial value problems Eulers Method Runge-Kutta Method

2nd Order 4th Order

These methods are derived from the Finite Difference Method

EULERS METHOD The simplest method to solve an ODE It is derived from the Taylor series expansion at x0. Considerh2 h3 h 4 4 y x y xo hy xo y xo y xo y xo 2! 3! 4!

Truncating at the second derivative term, we get

y x y xo hyxo

EULERS METHOD Defining the first derivative as

y xo f xo , yo The general equation for the Eulers Method is then

y xi 1 y xi hf xi , yi

EULERS METHOD

y xi 1 y xi hf xi , yi whereba h n

[a, b] is the interval and n is the number of intervals

In particular, xi+1 xi = h

this method is also known as the Euler Cauchy Method and Point Slope Method

EULERS METHODExample: Solve

dy 2 4x dx

at x = 2 given y(1) = 1 with n = 1Solution

y xi 1 y xi hf xi , yi

a = 1, b = 2, n = 1, h = ( 2 1)/1 = 1 y(2) = y(1) + (1)( 4(1)2 ) y(2) = 1 + 4 = 5

EULERS METHODGiven that

dy 0.8t 4e 0.5 y dx

and that the curve passes through the point ( 0, 2). What is the value of y when x = 4.

Use the Eulers method with one interval

The exact solution for the above problem is

4 0.8t 0.5t 0.5t y (e e ) 2e 1.3

EULERS METHODExample: Given that

dy x2 x y dxThe curve of the required function passes through the point ( 1, 1 ). What is the value of the function when x = 2? Use the Eulers method with one interval

The exact solution for the above problem is y x 2 and hence y 2 4

EULERS METHODExample : Given that

dy x2 x y dxand that the curve passes through the point (1,1). What is the value of y when x=2?

Use the Eulers Method with two intervals, i.e. we are reducing the step size.

EULERS METHODConclusions: Error can be reduced by decreasing the step size

This method will provide error free predictions if the solution to the differential equation is linear, because for a straight line, the second derivative is zero.