Top Banner

of 22

Boundary Value Problems

Nov 01, 2015

Download

Documents

Penjelasan Boundary Value Problems
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript

PowerPoint Presentation

Boundary-Value ProblemsINTRODUCTION AND BACKGROUNDTHE SHOOTING METHODThe Shooting Method for Nonlinear ODEsFINITE-DIFFERENCE METHODSBoundary-Value ProblemsTwo conditions are given at different values of the independent variable, this is called a Boundary-Value Problems.The function bvp4c solves two-point boundary value problems for ordinary differential equations (ODEs). It integrates a system of first-order ordinary differential equations y = f(x, y)on the interval [a, b], subject to general two-point boundary conditions : bc(y(a),y(b)) = 0 It can also accommodate other types of BVP problems, such as those that have any of the following:Unknown parametersSingularities in the solutionsMultipoint conditionslinear BVP

THE SHOOTING METHODDengan metode shooting dapat diselesaikan dengan memperkirakan mempunyai masalah nilai awal tanpa terlebih dahulu menyelesaikan masalah nilai batas. Kemudian kita dapat menggabungkan persamaan untuk mendapatkan solusi pendekatan, dengan harapan . Jika tidak, kita dapat mengubah nilai terkaan dan mencobanya lagi. Inti dari shooting method adalah bergerak dari salah satu batas (boundary), dengan menebak nilai turunan

10

FINITE-DIFFERENCE METHODSMetode beda hingga digunakan untuk menyelesaikan pers. diff biasa dengan syarat batas bukan persamaan diff dengan nilai awal.

FINITE-DIFFERENCE METHODS

Dengan menggunakan Matlab>> A=[2.2 -1 0 0; -1 2.2 -1 0; 0 -1 2.2 -1; 0 0 -1 2.2];>> b=[340 40 40 440]';>> T=A\b

The finite difference method in Matlabfunction err = bvp1(N)a = 0; b = 1;h = (b-a)/N;x = (a:h:b)';alpha = 1; beta = cosh(1)-1;e = ones(N-1,1);D2 = spdiags([e -2*e e],[-1:1],N-1,N-1)/h^2;b2 = [alpha; zeros(N-3,1); beta]/h^2;q = -ones(N-1,1);r = x(2:end-1).^2-2;y = (D2+diag(q))\(r-b2);plot(x,[alpha;y;beta])err = max(abs([alpha;y;beta]-(cosh(x)-x.^2)));

Finite-Difference Approaches for Nonlinear ODEs