How to create a simple differential equation

Solution 1:

Consider the family of curves $\gamma_C$ given by an equation of the form $$F(x,y)=C\ ,\qquad(1)$$ where the function $$F:\ {\mathbb R}^2\to {\mathbb R}\,\quad (x,y)\to F(x,y)$$ is explicitly given; e.g. $F(x,y):=x^2+y^2$. "Locally" such a $\gamma_C$ is the graph of a function $x\mapsto y(x)$. It follows that the function $$x\mapsto\phi(x):=F\bigl(x, y(x)\bigr)$$ is identically equal to $C$. Therefore by the chain rule $$\phi'(x)=F_{.1}\bigl(x,y(x)\bigr)\cdot 1+ F_{.2}\bigl(x,y(x)\bigr)\cdot y'(x)\equiv0\ ,$$ where $F_{.1}$ denotes the partial derivative of $F$ with respect to the first entry, and similarly for $F_{.2}$. Solving the last equation for $y'(x)$ gives $$y'(x)\equiv -{F_{.1}\bigl(x,y(x)\bigr)\over F_{.2}\bigl(x,y(x)\bigr)}\ .$$ But this is saying that the function $x\mapsto y(x)$ satisfies the differential equation $$y'=-{F_x(x,y)\over F_y(x,y)}\ .\qquad(2)$$ Here the right side ($=: f(x,y)$) is a known (resp., easily computable) function of $x$ and $y$ which is independent of $C$. Therefore the equation $(2)$ can be considered as the differential equation characterizing the family of curves $\gamma_C$ defined by $(1)$.

Consider the following example: The set $\gamma_C$ of points $(x,y)$ whose distances to the "foci" $(\pm1,0)$ have given product $C>0$ is called a Cassini curve. The equation of this curve is given by $$F(x,y):=\bigl((x-1)^2+y^2\bigr)\bigl((x+1)^2+y^2\bigr)=C^2\ .$$ When $C=1$ this curve is called a lemniscate. In order to obtain the differential equation of the family of curves $\gamma_C$ we compute $$F_x=2(x-1)\bigl((x+1)^2+y^2\bigr)+2(x+1)\bigl((x-1)^2+y^2\bigr)=\ldots$$ and $$F_y=2y\bigl((x+1)^2+y^2\bigr)+2y\bigl((x-1)^2+y^2\bigr)=\ldots\quad.$$ After doing the calculations (and maybe some simplification) we can put down the differential equation $$y'=-{F_x(x,y)\over F_y(x,y)}=:f(x,y)\ ,$$ where now $f(x,y)$ is a certain definite expression in $x$ and $y$ not containing the parameter $C$.

Note that the above explanations do not take into account "singular points" or points where the tangent of the considered curve $\gamma_C$ is vertical.

Solution 2:

I'm not entirely sure what you mean, but it sounds like you want to know how to differentiate implicitly. For instance, differentiating $x^{2}+y^{2}=25$ implicitly to get $\frac{dy}{dx}$ as a function of $x$ and $y$:

$$2x+2y\frac{dy}{dx}=0\implies \frac{dy}{dx}=-\frac{x}{y}$$

The process for doing this is by differentiating each term with respect to $x$ using the chain rule, for instance if we had $x^{2}+9xy^2+y^{4}=0$, then:

$$\frac{d}{dx}(x^{2})+\frac{d}{dx}(xy^{2})+\frac{d}{dx}(y^{4})=\frac{d}{dx}(0)$$

Therefore:

$$2x+y^{2}+2xy\frac{dy}{dx}+4y^{3}\frac{dy}{dx}=0 \implies (2xy+4y^{3})\frac{dy}{dx}=-2x-y^{2} \\ \therefore \frac{dy}{dx}=\frac{-2x-y^{2}}{2xy+4y^{3}}$$

I hope this answers your question?