1
$\begingroup$

I have invented this differential equation system:

$\frac{\mathrm{d}x(t)}{\mathrm{d}t}x(t)=-y(t)\cos(t)\\ \frac{\mathrm{d}y(t)}{\mathrm{d}t}x(t)=\cos^2(t)\\ x(0)=1;\,y(0)=0.$

I know that the solution is $x(t)=\cos(t)$ and $y(t)=\sin(t)$, but let's suppose that we don't know it.

I don't care if it is or not possible to solve it analytically, I want to solve it numerically. The problem is that when $x(t)=0$ there is a singularity (we are dividing by 0) and none of the algorithms I tried work.

Can I perform a variable change to get rid of this problem? Is there any other way besides a variable change to solve numerically this system of differential equations?

Thank you! Marcos.

  • 0
    Yes, it is. It is exactly the same thing. I just was thinking to perform a change of variables to polar coordinates $x(t)=\rho(t)\cos(\theta(t)),y(t)=\rho(t)\sin(\theta(t))$ since the solution would be $\rho(t)=1,\theta(t)=t$. It seems it can work. The problem is that sometimes I have to deal with systems more complex than this one and I don't know if this change of variables will always work.2017-02-12
  • 0
    When I say "systems more complex than this one", I mean systems with more than two equations (for example).2017-02-12

0 Answers 0