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

  • Thread starter Thread starter dirk_mec1
  • Start date Start date
  • Tags Tags
    Matlab Nonlinear
Click For Summary

Discussion Overview

The discussion revolves around numerically solving a nonlinear boundary value problem (BVP) represented by a second-order differential equation involving a polynomial function D(x) in the context of MATLAB. Participants explore various methods for approaching the problem, including the shooting method and integration techniques.

Discussion Character

  • Homework-related
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant presents a differential equation and expresses uncertainty about how to handle the polynomial D(x) when iterating towards the solution φ(x).
  • Another participant suggests using the shooting method and inquires about the boundary conditions that φ(x) must satisfy.
  • A participant clarifies the boundary conditions as φ(0) = 0 and φ'(L) = 0, and questions whether the shooting method is preprogrammed in MATLAB.
  • Another participant explains that the shooting method is straightforward and involves defining a function and using an integration algorithm, such as R-K45, while adjusting the initial derivative to meet the boundary condition φ(L) = 0.
  • A participant references MATLAB's fsolve function but states it is not suitable for this problem.
  • One participant elaborates on the requirements for the second-order differential equation, emphasizing the need for two additional values to determine the solution and explaining how the shooting method operates by guessing the initial derivative value.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best method to solve the problem, with differing opinions on the applicability of the shooting method and the use of fsolve. There is also uncertainty regarding the handling of the polynomial D(x) in the numerical solution process.

Contextual Notes

Participants highlight the need for specific boundary conditions and the implications of the second-order nature of the differential equation, but there are unresolved details regarding the implementation of the shooting method and the treatment of D(x).

dirk_mec1
Messages
755
Reaction score
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
Did you tried the shooting method ?
What bounday values must fulfill ##\phi(x)## ?
 
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?
 
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##.
 
No fsolve does not work here.

I do not understand what you mean with changing the BC.
 
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.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 26 ·
Replies
26
Views
2K
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K