Need help having a problem with shooting mthd

  • Thread starter arditi
  • Start date
In summary, the individual is seeking help with coding a MATLAB code for a given differential equation that needs to be solved using the function ODE23 and FZERO. They are struggling with reducing the problem to a root finding problem and are looking for assistance from the community.
  • #1
arditi
2
0
need help please having a problem with shooting mthd

i am having a problem coding a MATLAB code for the given eqn

d^2T/dx^2 - 1*10^-7(T+273)^4+4(150-T)=0
BC T(0)=200 and T(0.5)=100

the differential equation should be solved by
the function ODE23, and the consistent initial condition should be found by the
function FZERO in Matlab. I have to reduce the problem to a root finding
problem somehow, but i just can't do it.
please help me
 
Physics news on Phys.org
  • #2


Welcome to PhysicsForums!

I myself am hazy on the Shooting Method, but you may want to start here (or in your notes / textbook):
http://en.wikipedia.org/wiki/Shooting_method

...And for future reference, homework questions like this more properly belong in the Engineering and Computing Science homework forum.
 
  • #3


Hello,

Thank you for reaching out for help with your coding problem. I understand that you are trying to solve a differential equation using MATLAB and are having trouble with the shooting method. It sounds like you are on the right track by using the ODE23 and FZERO functions, but are struggling with reducing the problem to a root finding problem.

One possible approach could be to use the bisection method to find the root of the equation. This method involves dividing the interval between the two boundary conditions (T(0) and T(0.5)) into smaller intervals and checking for a sign change in the function. Once a sign change is found, the root can be approximated by taking the midpoint of the interval. This process can be repeated until the desired level of accuracy is achieved.

Another option could be to use the shooting method in combination with a solver like fsolve to find the root of the equation. This involves guessing an initial condition for T(0.5) and solving the differential equation using ODE23. If the resulting value of T(0.5) does not match the desired boundary condition, the guess can be adjusted and the process can be repeated until the desired accuracy is achieved.

I recommend consulting with a colleague or mentor for further assistance and guidance on implementing these methods in your code. Best of luck with your project!
 

Related to Need help having a problem with shooting mthd

1. What is the shooting method and how does it work?

The shooting method is a numerical technique used to solve ordinary differential equations (ODEs). It involves breaking down the ODE into a system of first-order ODEs and then solving them using an initial value problem approach. This method is useful for solving boundary value problems, where the values at both ends of the domain are known.

2. What are some common problems that can arise when using the shooting method?

Some common problems with the shooting method include convergence issues, difficulty in finding appropriate initial values, and instability in the numerical solution. These problems can be addressed by adjusting the step size, using more accurate numerical methods, and adjusting the initial values to improve convergence.

3. How do I choose appropriate initial values when using the shooting method?

Choosing appropriate initial values for the shooting method can be challenging, especially for complex ODEs. One approach is to start with a guess and then adjust the initial values iteratively until the solution converges. Another approach is to use knowledge of the physical system and the behavior of the solution to make informed guesses for the initial values.

4. Can the shooting method be used for all types of ODEs?

No, the shooting method is most effective for solving boundary value problems, which involve finding the solution at specific boundary points. It may not be as efficient for initial value problems, where the solution is known at only one point. In these cases, other numerical methods such as Euler's method or Runge-Kutta methods may be more suitable.

5. How can I validate the results obtained from the shooting method?

One way to validate the results obtained from the shooting method is to compare them with analytical solutions, if they exist for the given ODE. Another method is to use different numerical techniques and compare the results. It is also important to check for consistency and convergence of the solution as the step size is decreased.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
3K
  • Introductory Physics Homework Help
Replies
1
Views
1K
  • Advanced Physics Homework Help
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
847
Back
Top