two point boundary vale problem

2 次查看(过去 30 天)
Lewis Watson
Lewis Watson 2011-3-14
I have a problem asking me to solve a second order diffrential equation of the form;
-u"(x)+x^2u(x)=f(x), 0<x<1 subject to u(0)=0 and u(1)=0
i have to create a function file which implements a function y=e^(-x^4) cos(20x)
and another function file with first line of the form;
function [ x,U ] = centraldiff(n,f) with inputs n is such that n+1 is the number of divions of [0,1] and the second input is a string which gives the name of a function describing the function.
i will be extremly thankful for any help, as i have noclue to this lab question.
thankyou

回答(1 个)

Sarah Wait Zaranek
Sarah Wait Zaranek 2011-3-14
The function bvp4c should be able to get you started.
There are some nice examples in the documentation for bvp4c that should help you out. http://www.mathworks.com/access/helpdesk/help/techdoc/ref/bvp4c.html

类别

Help CenterFile Exchange 中查找有关 Numerical Integration and Differentiation 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by