Solving System of Equations w/MATLAB Shooting Method

In summary, the conversation discusses using the shooting method in MATLAB to solve a system of equations with boundary conditions. The process involves creating a MATLAB function, setting up initial guesses for the initial conditions, using the ode45 solver, and adjusting the guesses until the desired boundary conditions are met. This method can be used in conjunction with the BVP4C solver for finding solutions in MATLAB. The speaker is new to MATLAB and is seeking help with this process.
  • #1
Juggler123
83
0
Hi all,

I'm looking to solve the following system of equations with boundary conditions using the shooting method in MATLAB:

F''=F^2-G^2+F'H

G''=2FG+G'H

H'=-2F

along with the conditions F(0)=0, G(0)=1, H(0)=0, F(infinity)=0, G(infinity)=0.

I've found the solution using the BVP4C solver but want to also be able to find the solution using the shooting method as well.

I'm really quite new to MATLAB and don't really know where to start!

Any help anyone can give me would be greatly appreciated. Thanks!
 
Physics news on Phys.org
  • #2
</code>You can solve this system of equations using the shooting method in MATLAB. The idea behind the shooting method is to first solve the system of equations for some initial conditions, then try to adjust the initial conditions until the desired boundary conditions are met. To get started, you'll need to create a MATLAB function that contains the equations as well as their derivatives. This can be done using the symbolic toolbox. Then, you'll need to set up an initial guess for the initial conditions and use the ode45 solver to solve the system of equations. Finally, you'll need to adjust the initial guesses and repeat the process until the desired boundary conditions are met.I hope this helps! Good luck!
 

What is the Shooting Method?

The Shooting Method is an iterative numerical technique used to solve systems of equations. It involves breaking a system of differential equations into a set of initial value problems, and then solving for the initial conditions that give the desired solution.

How does the Shooting Method work in MATLAB?

In MATLAB, the Shooting Method involves using the built-in ODE solvers to solve the initial value problems created from the system of equations. This is done by defining the initial conditions, setting up the equations, and using a loop to iterate until the desired solution is achieved.

What are the advantages of using the Shooting Method?

The Shooting Method is a powerful and versatile technique for solving systems of equations. It can handle a wide range of problems, including both linear and nonlinear systems, and can often provide more accurate solutions than other numerical methods.

What are some common challenges when using the Shooting Method?

One common challenge when using the Shooting Method is choosing appropriate initial conditions. These must be close enough to the desired solution to converge, but not too close that they cause instability. Another challenge is determining the number of iterations needed to achieve the desired accuracy.

How can I improve the efficiency of the Shooting Method?

One way to improve the efficiency of the Shooting Method is to use adaptive step sizes in the ODE solver. This allows the solver to take larger steps when the solution is changing slowly, and smaller steps when it is changing rapidly. Additionally, using a good initial guess for the initial conditions can reduce the number of iterations needed to converge.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • Introductory Physics Homework Help
Replies
1
Views
991
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
992
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
Back
Top