title: error solving two coupled second order differential equations in matlab
body: <p>I am trying to solve the following differential equations on matlab. (They are the equations obtained from the yang-mills-higgs lagrangian for the hoofy polyakov monopole ansatz). This is my function file. I have two variables h and k and their derivatives w.r.t to a variable t. My x(1)=h, x(2)=k, x(3)=dh\dt, x(4)=dk\dt. All the functions have initial value 0.</p>
  
  <pre><code>    function xprime = monopole( t,x )
      %UNTITLED Summary of this function goes here
      %   Detailed explanation goes here
  
      xprime(1)=x(3);
      xprime(2)=x(4);
      xprime(4)=(1/(t.^2)).*((x(2).^2)-1).*x(2) + 4.*(x(1).^2).*x(2);
      xprime(3)=(2/(t.^2)).*(x(2).^2).*x(1)-(1-(x(1)).^2).*x(1)-(2/t).*x(3);
      xprime=xprime(:);
  
  
  
  
  end
  </code></pre>
  
  <p>Now when I run the following code
      ></p>
  
  <pre><code>&gt; t0=0;
      &gt;&gt; tf=10;
      &gt;&gt; x0=[0 0 0 0];
      &gt;&gt; [t,s]=ode45(@monopole,[t0,tf],x0);
      &gt;&gt; plot(t,s(:,1));
  </code></pre>
  
  <p>I am not getting anything. The graph window appears but it doesnt contain anything. This equations are supposed to have solutions. The dotted curves is what one should get with the curve starting from 1 is k, and from 0 is h. </p>
  
  <p><img src="https://i.stack.imgur.com/n22VZ.png" alt="enter image description here"></p>
  
  <p>What is my mistake?</p>