Numerical Solution for Nonlinear BVP with Polynomial D(x) in Matlab

In summary, the conversation discusses solving a differential equation numerically using Matlab. The equation includes a polynomial function and the conversation also mentions using the shooting method to obtain the values of the function and its derivative at the ends of the interval. The conversation also suggests using integration algorithms and provides a link for more information.
  • #1
dirk_mec1
761
13

Homework Statement


Solve from the differential equation below numerically for the function [itex] \phi(x) [/itex] for [itex] x \in [0,L] [/itex]

[tex]\phi '' (x) + D(x) sin(\phi (x) ) + E sin(\phi (x) ) cos( \phi (x) ) = 0 [/tex]

with D(x) a polynomial.

Homework Equations


Matlab.

The Attempt at a Solution


I can rewrite it in a state space form and then iterate towards the function [itex] \phi(x) [/itex] if D is constant. But what can I do with that pesky D(x). If I am iterating towards D(x) I cannot iterate, right?
 
Physics news on Phys.org
  • #2
Did you tried the shooting method ?
What bounday values must fulfill ##\phi(x)## ?
 
  • #3
Right I forgot:

[tex] \phi(0) =0 [/tex]
[tex] \phi ' (L) =0 [/tex]

No I haven't tried the shooting method, it it preprogrammed in Matlab?
 
  • #4
No, but it is straight forward. Just define you function and use some integration algorithm, e.g. R-K45, then by changing the value of ##\phi^\prime(x=0)## you should obtain ##\phi(x=L)=0##.
 
  • #6
No fsolve does not work here.

I do not understand what you mean with changing the BC.
 
  • #7
You partial derivative equation is of second order, and this means that Beside the equation itself one has to provide two aditional values in order to determine the solution, you can either specify ##\phi(x=0)## and ##\phi(x=L)##, or ##\phi(x=0)## and ##\phi^\prime(x=0)##. You are given the function values at the ends of the interval, but the shooting methods uses the values at one end of the interval, i.e. the function and its derivative, and by integration you end up with the value of the function at the other end of the interval. This is how the shooting method work, you need to "guess" the value of ##\phi^\prime(x=0)## in order to obtain ##\phi(x=L) = 0##. You can do it by trial and error or build up some iteration loop. See also the wikipedia article on shooting method.

For other numerical methods you specify directly the values of the function at both ends of the interval.
 

FAQ: Numerical Solution for Nonlinear BVP with Polynomial D(x) in Matlab

What is a nonlinear BVP?

A nonlinear BVP (Boundary Value Problem) is a mathematical problem that involves finding a solution to a differential equation, where the boundary conditions are specified at both ends of the solution domain.

What is a polynomial D(x) in the context of numerical solutions?

In the context of numerical solutions, a polynomial D(x) refers to a function that is represented by a finite series of algebraic terms, with the independent variable x raised to different powers.

How can I solve a nonlinear BVP with a polynomial D(x) in Matlab?

To solve a nonlinear BVP with a polynomial D(x) in Matlab, you can use the built-in functions such as "bvp4c" or "bvp5c". These functions use numerical methods to find a numerical solution to the BVP.

Are there any limitations to using Matlab for solving nonlinear BVPs with polynomial D(x)?

Yes, there are limitations to using Matlab for solving nonlinear BVPs with polynomial D(x). One limitation is that the solution may not be accurate if the polynomial D(x) has a large degree or if the BVP has a highly nonlinear nature. In these cases, it is recommended to use more advanced numerical methods or software.

What are some applications of solving nonlinear BVPs with polynomial D(x)?

Solving nonlinear BVPs with polynomial D(x) has many applications in science and engineering, such as in the study of fluid dynamics, heat transfer, and chemical reactions. It is also used in various fields of physics, including quantum mechanics, electromagnetism, and astrophysics.

Similar threads

Back
Top