2
$\begingroup$

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.

  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

Now when I run the following code >

> t0=0;
    >> tf=10;
    >> x0=[0 0 0 0];
    >> [t,s]=ode45(@monopole,[t0,tf],x0);
    >> plot(t,s(:,1));

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.

enter image description here

What is my mistake?

$\endgroup$
2
$\begingroup$

The value $x=[0,0,0,0]^T$ is an equilibrium solution of your system of ODEs. So MATLAB is computing and plotting the answer -- all zeros. It appears that some entries in your initial vector $x_0$ should be 1 rather than 0.

Judging from your expected solution, x0 is likely supposed to be $[0,1,1,0]^T$. That will produce the same initial values (assuming the slope of the h curves is 1 at the origin).

$\endgroup$

Your Answer

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