Good day, everyone. Basically , the problem I am given is to solve the system of differential equations with 4 equations, and I have two initial values, and two boundary conditions. Following the Shooting method theory, I supply my system with two guesses for missing initial values, solve the system using Runge-Kutta 4th order, and obtain some values for functions, which are not right based on my boundary conditions.The question is how to iterate my system of approximations for initial values, to obtain right initial guesses? If I had only one value to be found by this method, it would be easy, by just implementing some form of linear interpolation, squeezing down the solution from two ends. But since there are two values guessed, it is not working anymore. Any ideas would be greatly appreciated.

My functions are like this: \begin{align} \dot x_1(t) &= x_2(t), \\ \dot x_2(t) &= p_2(t)-\sqrt 2 x_1(t)e^{-\alpha t}, \\ \dot p_1(t) &= \sqrt 2 p_2(t)e^{-\alpha t}+x_1(t), \\ \dot p_2(t) &= -p_1(t) \end{align} with initial and boundary values of: $x_1(0)=1$, $p_2(0)=0$; $p_1(1)=0$, $p_2(1)=0$

  • $\begingroup$ My functions are like this: $\dot x_1(t) = x_2(t)$, $\dot x_2(t) = p_2(t)-\sqrt 2 x_1(t)e^{-\alpha t}$, $\dot p_1(t) = \sqrt 2 p_2(t)e^{-\alpha t}+x_1(t)$, $\dot p_2(t) = -p_1(t)$ with initial and boundary values of: $x_1(0)=1,p_2(0)=0 p_1(1)=0,p_2(1)=0$ $\endgroup$ – Farid Hasanov Nov 19 '18 at 12:30
  • $\begingroup$ You get a map $\phi:(p_1(0),p_2(0))\mapsto(p_1(1),p_2(1))$. Your objective is to find a solution to $\phi(a,b)=(1,1)$. There are trillions of methods to solve nonlinear equations. You can try Newton method for instance. The derivatives of $\phi$ solve an ODE on their own. $\endgroup$ – Federico Nov 20 '18 at 18:59
  • $\begingroup$ Hey man! Does that mean that my Jacobian matrix is 1x2 matrix ? How do I find a determinant of it then ?( For Newton method) $\endgroup$ – Farid Hasanov Nov 20 '18 at 20:47
  • $\begingroup$ No no, the map is $\phi:\mathbb R^2\to\mathbb R^2$, so its differential is a linear map $D\phi:\mathbb R^2\to\mathbb R^2$, hence representable by a $2\times2$ matrix. Also, you don't need the determinant for the Newton method, you just need to solve a linear system: see en.wikipedia.org/wiki/… $\endgroup$ – Federico Nov 21 '18 at 15:41
  • $\begingroup$ What's more important is that if you call $\phi_t:\mathbb R^2\to\mathbb R^2$ the flow map of your ODE from time $0$ to time $t$, then $\phi_t$ also solves an ODE, which allows you to compute both $\phi_1$ and $D\phi_1$ numerically. $\endgroup$ – Federico Nov 21 '18 at 15:43

As your ODE system is linear, your solutions will also be (affine) linear in the initial conditions. Parametrize the unknown conditions at $x=0$ as $u=\pmatrix{u_1\\u_2}=\pmatrix{x_2(0)\\p_1(0)}\in\Bbb R^2$ and name the target variables at $x=1$ as $v=\pmatrix{v_1\\v_2}=\pmatrix{p_1(1)\\p_2(1)}$, with requested values $v^*=\pmatrix{0\\0}$. Then $v=f(u)$, where $f$ contains the integration from $x=0$ to $1$, is an affine linear function.

Now any affine linear function $v=f(u)=Au+b$ can be reconstructed from 3 function values at points in general position. Set $v^k=f(u^k)$, $k=1,2,3$, and construct $$ U=\pmatrix{u_1^1&u_1^2&u_1^3\\u_2^1&u_2^2&u_2^3\\1&1&1}~~\text{ and }~~ V=\pmatrix{v_1^1&v_1^2&v_1^3\\v_2^1&v_2^2&v_2^3\\1&1&1} $$ then $$ \pmatrix{A&b\\0&1}=VU^{-1}, $$ as $$ \pmatrix{A_{11}&A_{12}&b_1\\A_{21}&A_{22}&b_2\\0&1} \pmatrix{u_1^k\\u_2^k\\1}=\pmatrix{Au^k+b\\1}=\pmatrix{v^k\\1}. $$ The initial condition you are looking for is then obtained as $u^*=A^{-1}(v^*-b)$. You can refine this results to get more numerical accuracy by repeating this computation from points $u^k$ close to $u^*$.

  • $\begingroup$ Hey man! Why does your U matrix consist of three values ? My shooting parameters are only two. Did u mean it should be $u_1$ and $u_2$ only ? Thanks a lot in advance $\endgroup$ – Farid Hasanov Nov 20 '18 at 20:49
  • $\begingroup$ The $u_k$ and $v_k$ are column vectors with 2 components, so that the matrices $U$ and $V$ are $3\times 3$ matrices. $\endgroup$ – LutzL Nov 20 '18 at 21:53
  • $\begingroup$ What is $u_3$ then ? $u_1$ is my $x_2(0)$ , first guessing parameter, and $u_2$ is my second guessing parameter, $p_1(0)$. $\endgroup$ – Farid Hasanov Nov 21 '18 at 3:24
  • $\begingroup$ I've put some more detail in, it seems it was not clear that I wrote in block matrices. $\endgroup$ – LutzL Nov 21 '18 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.