# I am looking to solve the following equations numerically: a x = d

I am looking to solve the following equations numerically:
$ax=\frac{d}{dt}\left(f\left(x,y,t\right)\frac{dy}{dt}\right),\phantom{\rule{1em}{0ex}}by=\frac{d}{dt}\left(g\left(x,y,t\right)\frac{dx}{dt}\right)$
For arbitrary functions f and g and constants a and b. I am struggling to find a way to transform this into a system of first order differential equations that I can pass into a solver. It looks like I will need to define these implicitly, but I'm not sure how to do that.
My best attempt so far is the following:
$\begin{array}{rl}{z}_{1}& =f\left(x,y,t\right)\frac{dy}{dt}\\ {z}_{2}& =g\left(x,y,t\right)\frac{dx}{dt}\\ {z}_{3}& =ax\\ {z}_{4}& =by\end{array}$
${\left(\begin{array}{c}{z}_{1}\\ {z}_{2}\\ {z}_{3}\\ {z}_{4}\end{array}\right)}^{\prime }=\left(\begin{array}{cccc}0& 0& 1& 0\\ 0& 0& 0& 1\\ 0& \frac{a}{g\left(t,x,y\right)}& 0& 0\\ \frac{b}{f\left(t,x,y\right)}& 0& 0& 0\end{array}\right)\left(\begin{array}{c}{z}_{1}\\ {z}_{2}\\ {z}_{3}\\ {z}_{4}\end{array}\right)$
However, this seems fairly inelegant and assumes that you are always able to divide by f and g. I'm trying to keep this as general as possible, so don't want to make that assumption. Is there a better way to turn this into a system of first order differential equations implicitly?
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

redclick53
I would rather define u=x' and v=y'. Then, your system becomes
$\left(\begin{array}{c}{x}^{\prime }\\ {y}^{\prime }\\ f{v}^{\prime }\\ g{u}^{\prime }\end{array}\right)=\left(\begin{array}{c}u\\ v\\ ax-{f}_{x}uv-{f}_{y}{v}^{2}\\ by-{g}_{x}{u}^{2}-{g}_{y}uv\end{array}\right)$
As long as $f\ne 0\ne g$, this is a nonlinear system of first order ODEs. If, at a certain point, f=0, or g=0, or both, then this system is a differential-algebraic equation