How to solve two coupled nonlinear Schrodinger equations in MATLAB? - matlab

The two coupled equations are as follows: where i->sqrt(-1); 'u_t' refers to the first order derivative w.r.t. the time 't', 'u_z' is the first order derivative w.r.t. 'z', similarly, 'u_tt' means second order derivative w.r.t. time.
|u|^2 is u*conjugate(u).
i*u_z-a*u_tt+|u|^2*u+kv=i*b*(u+c*u_tt)
i*v_z-a*v_tt+|v|^2*v+ku=i*b*(v+c*v_tt)
I have solved such single equation, but how to solve such two-coupled equations in MATLAB?

From the link here
Partial differential equations with pdepe
MATLAB's pdepe solves a class of parabolic/elliptic PDE systems. The
time-dependent Schrodinger equation is an example of parabolic PDE
while the Poisson equation is an example of elliptic PDE. We will not
discuss the use of pdepe in the class but refer you to the MATLAB's
documentation for the details.
Looks like your best bet is to look at pdepe as an example of a parabolic PDE.

Related

How to solve this system of differential equations in matlab?

My task is to model a certain physical problem and use matlab to solve it's differential equations. I made the model but it seems far more complex than what I've learned so far so I have no idea how to solve this.
The black color means it's a constant
I assume that by "solve" you seek a closed form solution of the form x(t) = ..., z(t) = ... Unforunately, it's very likely you cannot solve this system of differential equations. Only very specific canonical systems actually have a closed-form solution, and they are the most simple (few terms and dependent variables). See Wikipedia's entry for Ordinary Differential Equations, in particular the section Summary of exact solutions.
Nevertheless, the procedure for attempting to solve with Matlab's Symbolic Math Toolbox is described here.
If instead you were asking for numerical integration, then I will give you some pointers, but you must carry out the math:
Convert the second order system to a first order system by using a substitution w(t) = dx/dt, allowing you to replace the d2x/dt2 term by dw/dt. Example here.
Read the documentation for ode15i and implement your transformed model as an implicit differential equation system.
N.B. You must supply numerical values for your constants.

What kind of numerical method does 'pdepe' (MATLAB function's) use?

I'm using the MATLAB's function 'pdepe' to solve a problem with some partial differential equations, a parabolic one.
I need to know the kind of numerical method that function uses, 'cause I have to notify this in a report.
The description of the function in MathWorks is "Solve initial-boundary value problems for systems of parabolic and elliptic PDEs in one space variable and time". Is it a finite difference method?
Thanks for helping me.
Taken from the Matlab 2016b documentation for pdepe:
The time integration is done with ode15s. pdepe exploits the
capabilities of ode15s for solving the differential-algebraic
equations that arise when Equation 1-3 contains elliptic equations,
and for handling Jacobians with a specified sparsity pattern.
Also, from the ode15s documentation:
ode15s is a variable-step, variable-order (VSVO) solver based on the
numerical differentiation formulas (NDFs) of orders 1 to 5.
Optionally, it can use the backward differentiation formulas (BDFs,
also known as Gear's method) that are usually less efficient
As indicated by Alessandro Trigilio, ode15s is used to advance the solution forward in time. Exactly what the function is advancing in time is a semi-discrete, second-order Galerkin formulation for non-singular problems or a semi-discrete, second-order Petrov-Galerkin formulation for singular problems (polar or spherical meshes that include the origin). As such, the spatial discretization is finite element in nature.

Can matlab solve a system of more than two PDEs numerically?

I know that MATLAB can solve a system of 2 coupled PDEs using pdex4, however is there something similar that can solve a system of more coupled PDEs, say 6? The bigger system has the same structure (dependence on partial derivatives, boundary conditions, type of initial condition etc) as the system of 2 equations.
Thanks.
With the FEATool Matlab FEM toolbox you can set up and solve an arbitrary number of coupled PDEs.
The function pdefun (that you pass as an input to pdepe) defines your system of equations and has the general form,
[c,f,s] = pdefun(x,t,u,dudx)
c, f, and s are coefficients in the PDE (see Eq. 1-3 here). They can be column vectors to allow for any number of coupled equations. In the pdex4 example these vectors have 2 elements; in your case they would have 6.
MATLABs Partial Differential Equation Toolbox allows you to solve systems of multiple equations. For coupling of source terms, you can solve the initial PDE for the source, then use that as an input for a second PDE model which will give the final results. More info can be found here

How can I calculate the nonlinear system gains?

Are there any codes in matlab to to calculate the gains of state-space matrix for nonlinear system? the system equations are written in differential equations and I used Runge-Kutta 4th Order Method to get the dynamic response of the states with time.

Solve coupled set of second order nonlinear differential equations using MatLab

I'm basically trying to model the motion of a compound double pendulum, the lagrange equations produce this pair of coupled differential equations: Equations of motion for a compound pendulum.
I wish to apply ode45 to model the behavior over time. I understand that they need to be reduced into 4 first order equations, but I'm baffled over the syntax/rearrangement that may or may not be required due to the coupling.