# Can we abuse notation and write equations in differential one-form?

Consider a simple equation with a one-form on both sides (mathworld.wolfram is also aware of this):

$$y\mathrm{d}x = \mathrm{d}y$$

This is a perfectly valid abuse of notation. We can carry the $y$ over to the right, then integrate both sides:

$$\int \mathrm{d}x = \int \frac{\mathrm{d}y}{y}$$

to get

$$x = \log y + C$$

or we can carry the differential of $x$ and get a normal differential equation:

$$y = \frac{\mathrm{d}y}{\mathrm{d}x}=y'(x)$$

which we can plug into DSolve and find y[x]->C[1]Exp[x]

The question is, can we get Mathematica to accept this abuse of notation like so

DSolve[y \[DifferentialD]x == \[DifferentialD]y, y, x]


and solve equations involving infinitesimal values on both sides?

Unfortunately, searching the documentation or this site for "k-form", "one-form", "differential form" did not yield helpful results.

• This is essentially a division by $dx$, which is, of course, all, that is needed in this simple example. I'll try to find something more interesting. – LLlAMnYP May 5 '15 at 13:19
• Well, my first thought was to put a differrential into a function. \[DifferentialD]y == Log[1 + \[DifferentialD]x]. Then naively you'd expect y==C+x, but your code returns y==C+x Log[2]. But this feels like cheating. I'm exploring options with functions of multiple arguments or higher order equations for the moment. – LLlAMnYP May 5 '15 at 13:40
• Well, the feeling of cheatiness was perfectly valid then. I'm certainly not insisting on a solution to automate such irregular and often simply invalid constructs, I'd just like to find a more or less general approach to putting equations from the OP into Mathematica. I slightly generalized your suggestion with this snippet (-dif[(y/x)] == 2 x Tan[y/x] dif[x]) /. {y -> y[x]} /. {dif[g_] -> Dt[g, x]*dif[x]} which should properly handle differentials of arbitrary things, not just x and y – LLlAMnYP May 5 '15 at 14:00

Ok, now I'm feeling stupid.

First I asked Wolfram Alpha and it interpreted my query correctly. Then I did

WolframAlpha["solve y dx=dy", {{"Input", 1}, "Input"}]
(* HoldComplete[y Dt[x] == Dt[y]] *)


That gave me a clue for the proper notation.

DSolve[y[x] Dt[x] == Dt[y[x]], y, x]
(* {{y -> Function[{x}, E^x C[1]]}} *)


Mathematica handles differentials out of the box just fine.

• I think you really uncovered a blind spot! Now the procedure seems to be evident: Dt[y[x]] evaluates to y'[x] Dt[x] and for any correct DE Dt[x] will be eliminated finally. But these thoughts never came to me! – xzczd May 6 '15 at 3:21
• When searching for y one would be looking to eliminate Dt[y[x]] and integrate whatever it is expressed as. But I see what's happening, you are indeed correct. – LLlAMnYP May 6 '15 at 4:47
• Maybe it's also worth pointing out that Mathematica "knows" what you're thinking if you enter TraditionalForm[Dt[x]]. The output is $\mathbb{d}x$. – Jens Jul 31 '16 at 4:30