Leibniz did not define his differentials dy and dx as infinitesimal quantities, but as line segments from which he could calculate dy/dx as a ratio. However, he needed infinitesimal methods to derive his algorithms. Note that there is a sign ambiguity in his quotient rule, because all his distances are positive.
By 1690, Leibniz had discovered most of the ideas of elementary calculus, including differential equations, but he did not write up a complete treatment of this material, which was first done by L'Hospital (1651--1704) and Jean Bernoulli (1667--1748).
He was bothered by the use of infinitesimals which he justified in two ways:
1. He related infinitesimal methods to Archimedean Exhaustion, and believed that every argument involving infinitesimals could be replaced by a geometric proof. But new insights needed infinitesimal methods.
2. By a 'law of continuity', " if some relationship is true for continuous quantities that terminate in a certain limit, the same relationship is true in the limit." For example, if 1 <= dy/dx <= 2 for finite values of dx , it is also true in the limit.