# Equation describing the electric field lines of opposite charges

Right now I am preparing for IPhO and the book I had mentions about the "Field lines" as a curve which has the property which any tangent line to the curve represents the direction of the electric field , Satisfying the equation $$\frac{dy}{dx}=\frac{E_y}{E_x}$$

The example in the book had shown 2 opposite charges both distance $$a$$ away from the origin (Assume that the distance is near to the charges enough that it can't be approximated as a dipole)

Now the book had yield the field line as a solution to the differential equation $$\frac{dy}{dx}=\frac{y}{x+a\frac{PB^3+PA^3}{PB^3-PA^3}}$$ where $$PA=\sqrt{(x+a)^2+y^2}$$ and $$PB=\sqrt{(x-a)^2+y^2}$$ (PA and PB are the distance shown in the picture below)

The book has said that the solution to the differential equation above is $$cos\theta_A-cos\theta_B=\alpha=$$Constant

But I can't seem to find a way to solve the equation above. The book had not provided the steps in solving the equation, But said that this equation can be solved by the relationship between electric potential, Coordinate geometry and Observation rather than directly integration.

I feel like it wouldn't be useful to apply the formula $$E=-\nabla V$$ and can not even try to link it with coordinate geometry.

So could you provide me a hint to solve the equation? Or if you're kind enough,To provide the full solution to the equation above?

• Related if not Duplicate : Trajectory of electric field lines. Aug 5, 2023 at 11:50
• @Frobenius Thanks very much for the proof. The Gauss's law derivation is quite interesting problem solving method! Aug 5, 2023 at 13:13
• ...thanks to @Michael Seifert... Aug 5, 2023 at 15:35

$$\newcommand{\bl}[1]{\boldsymbol{#1}} \newcommand{\e}{\bl=} \newcommand{\p}{\bl+} \newcommand{\m}{\bl-} \newcommand{\mb}[1]{\mathbf {#1}} \newcommand{\mc}[1]{\mathcal {#1}} \newcommand{\mr}[1]{\mathrm {#1}} \newcommand{\mf}[1]{\mathfrak{#1}} \newcommand{\gr}{\bl>} \newcommand{\les}{\bl<} \newcommand{\greq}{\bl\ge} \newcommand{\leseq}{\bl\le} \newcommand{\il}[1]{\:#1\:} \newcommand{\plr}[1]{\left(#1\right)} \newcommand{\blr}[1]{\left[#1\right]} \newcommand{\clr}[1]{\left\{#1\right\}} \newcommand{\vlr}[1]{\left\vert#1\right\vert} \newcommand{\Vlr}[1]{\left\Vert#1\right\Vert} \newcommand{\lara}[1]{\left\langle#1\right\rangle} \newcommand{\lav}[1]{\left\langle#1\right|} \newcommand{\vra}[1]{\left|#1\right\rangle} \newcommand{\lavra}[2]{\left\langle#1|#2\right\rangle} \newcommand{\lavvra}[3]{\left\langle#1\right|#2\left|#3\right\rangle} \newcommand{\vp}{\vphantom{\dfrac{a}{b}}} \newcommand{\Vp}[1]{\vphantom{#1}} \newcommand{\hp}[1]{\hphantom{#1}} \newcommand{\tl}[1]{\tag{#1}\label{#1}}$$

The differential equation to be solved is $$$$\dfrac{\mr dy}{\mr dx} \e \dfrac{E_y\plr{x,y}}{E_x\plr{x,y}} \tl{01}$$$$ By a first glance it seems to be difficult or may be impossible to succeed separation of the used variables $$\:\plr{x,y}$$. This equation was solved by an accidentally successful change of variables. The new variables are $$$$u \e \tan\theta_{\mr A} \,,\qquad v \e \tan\theta_{\mr B} \tl{02}$$$$ where $$\:\plr{\theta_{\mr A},\theta_{\mr B}}\:$$ the angles shown in Figure-01.

Using the geometry of the problem we'll transform the differential equation \eqref{01} with respect to $$\:\plr{x,y}\:$$ to a differential equation with respect to $$\:\plr{ u, v}$$. The new differential equation is separable and we note a priori that its solution yields the result

$$$$\cos\theta_{\mr A} \m \cos\theta_{\mr B} \e \texttt{constant} \nonumber$$$$ as OP mentioned in his post.

At first from the geometry of the problem we have $$$$\plr{x \m a}\tan\theta_{\mr B} \e y \e \plr{x \p a}\tan\theta_{\mr A} \nonumber$$$$ or $$$$\plr{x \m a} v \e y \e \plr{x \p a} u \tl{03}$$$$ so $$$$x \e \dfrac{\tan\theta_{\mr B}\p\tan\theta_{\mr A}}{\tan\theta_{\mr B}\m\tan\theta_{\mr A}}\, a \,,\qquad y \e \dfrac{2\tan\theta_{\mr B} \tan\theta_{\mr A}}{\tan\theta_{\mr B} \m \tan\theta_{\mr A}}\, a \tl{04}$$$$ or $$$$x \e \plr{\dfrac{v\p u}{v\m u}} a \,,\qquad y \e \plr{\dfrac{2\,v\, u}{v \m u}} a \tl{05}$$$$ From \eqref{05} $$$$\mr dx \e 2\,\dfrac{v\mr du\m u\mr d v}{\plr{v\m u}^2}\, a \,,\qquad \mr dy \e 2\,\dfrac{v^2\mr du\m u^2\mr d v}{\plr{v\m u}^2}\, a \tl{06}$$$$ From \eqref{06} the left hand side of \eqref{01} is transformed as follows $$$$\dfrac{\mr dy}{\mr dx} \e \dfrac{v^2\mr du\m u^2\mr d v}{v\mr du\m u\mr d v} \tl{07}$$$$ For the transformation of the right hand side of \eqref{01} we have at first \begin{align} E_x & \e kq\plr{\dfrac{x \m a}{\mr{PB}^3} \m \dfrac{x \p a}{\mr{PA}^3}} \tl{08a}\\ E_y & \e kq\plr{\hp{x}\dfrac{y}{\mr{PB}^3}\: \m \hp{x}\dfrac{y}{\mr{PA}^3}\:\Vp{\dfrac{x \m a}{\mr{PB}^3}}} \tl{08b} \end{align} so $$$$\dfrac{E_y}{E_x} \e \dfrac{\plr{\dfrac{1}{\mr{PB}^3} \m \dfrac{1}{\mr{PA}^3}}y}{\plr{\dfrac{1}{\mr{PB}^3} \m \dfrac{1}{\mr{PA}^3}}x \m \plr{\dfrac{1}{\mr{PB}^3} \p \dfrac{1}{\mr{PA}^3}}a} \tl{09}$$$$ From the geometry of the problem $$$$\mr{PA} \e \dfrac{y}{\sin\theta_{\mr A}} \,,\qquad \mr{PB} \e \dfrac{y}{\sin\theta_{\mr B}} \tl{10}$$$$ and \eqref{09} yields $$$$\dfrac{E_y}{E_x} \e \dfrac{\plr{\sin^3\theta_{\mr B} \m \sin^3\theta_{\mr A}}y}{\plr{\sin^3\theta_{\mr B} \m \sin^3\theta_{\mr A}}x \m \plr{\sin^3\theta_{\mr B} \p \sin^3\theta_{\mr A}}a} \tl{11}$$$$ Replacing $$\:x,y\:$$ by their expressions \eqref{04} in terms of $$\:\tan\theta_{\mr A},\tan\theta_{\mr B}\:$$ we have $$$$\dfrac{E_y}{E_x} \e \dfrac{\sin^3\theta_{\mr B} \m \sin^3\theta_{\mr A}}{\sin^2\theta_{\mr B}\cos\theta_{\mr B} \m \sin^2\theta_{\mr A}\cos\theta_{\mr A}} \tl{12}$$$$ Expressing the trigonometric functions $$\:\sin\theta_{\mr A},\cos\theta_{\mr A}\:$$ and $$\:\sin\theta_{\mr B},\cos\theta_{\mr B}\:$$ in terms of the new variables $$\:\tan\theta_{\mr A} \e u\:$$ and $$\:\tan\theta_{\mr B} \e v\:$$ respectively, that is \begin{align} \!\!\!\!\!\!\!\!\!\!\!\!\sin\theta_{\mr A} & \e \dfrac{\varepsilon_{\mr A}\tan\theta_{\mr A}}{\sqrt{1\p\tan^2\theta_{\mr A}}}\e \dfrac{\varepsilon_{\mr A}u}{\sqrt{1\p u^2}}\,, \quad \cos\theta_{\mr A} \e \dfrac{\varepsilon_{\mr A}}{\sqrt{1\p\tan^2\theta_{\mr A}}}\e \dfrac{\varepsilon_{\mr A}}{\sqrt{1\p u^2}} \tl{13a}\\ \!\!\!\!\!\!\!\!\!\!\!\! &\nonumber\\ \!\!\!\!\!\!\!\!\!\!\!\!\sin\theta_{\mr B} & \e \dfrac{\varepsilon_{\mr B}\tan\theta_{\mr B}}{\sqrt{1\p\tan^2\theta_{\mr B}}}\e \dfrac{\varepsilon_{\mr B}v}{\sqrt{1\p v^2}}\,, \quad \cos\theta_{\mr B} \e \dfrac{\varepsilon_{\mr B}}{\sqrt{1\p\tan^2\theta_{\mr B}}}\e \dfrac{\varepsilon_{\mr B}}{\sqrt{1\p v^2}} \tl{13b}\\ \!\!\!\!\!\!\!\!\!\!\!\! &\nonumber\\ \!\!\!\!\!\!\!\!\!\!\!\!\varepsilon_{\mr A} & \e \left. \begin{cases} \p 1, \quad \texttt{if } \theta_{\mr A}\bl\in \blr{0,\pi/2}\\ \m 1, \quad \texttt{if } \theta_{\mr A}\bl\in \blr{\pi/2, \pi} \end{cases} \right\}\,,\quad \varepsilon_{\mr B} \e \left. \begin{cases} \p 1, \quad \texttt{if } \theta_{\mr B}\bl\in \blr{0,\pi/2}\\ \m 1, \quad \texttt{if } \theta_{\mr B}\bl\in \blr{\pi/2, \pi} \end{cases} \right\} \tl{13c} \end{align} equation \eqref{12} yields $$$$\dfrac{E_y}{E_x} \e \dfrac{\varepsilon_{\mr B}\plr{1\p u^2}^\frac32 v^3 \m \varepsilon_{\mr A}\plr{1\p v^2}^\frac32 u^3}{\varepsilon_{\mr B}\plr{1\p u^2}^\frac32 v^2 \m \varepsilon_{\mr A}\plr{1\p v^2}^\frac32 u^2} \tl{14}$$$$ Combining \eqref{01}, \eqref{07} and \eqref{14} we have the differential equation in terms of the new variables $$\:u,v$$ $$$$\dfrac{v^2\mr du\m u^2\mr d v}{v\mr du\m u\mr d v}\e \dfrac{\varepsilon_{\mr B}\plr{1\p u^2}^\frac32 v^3 \m \varepsilon_{\mr A}\plr{1\p v^2}^\frac32 u^3}{\varepsilon_{\mr B}\plr{1\p u^2}^\frac32 v^2 \m \varepsilon_{\mr A}\plr{1\p v^2}^\frac32 u^2} \tl{15}$$$$ or $$$$\varepsilon_{\mr A}\dfrac{u\,\mr du}{\plr{1\p u^2}^\frac32} \e \varepsilon_{\mr B}\dfrac{v\,\mr dv}{\plr{1\p v^2}^\frac32} \tl{16}$$$$ that is $$$$\varepsilon_{\mr A}\dfrac{\mr d\plr{1\p u^2}}{\plr{1\p u^2}^\frac32} \e \varepsilon_{\mr B}\dfrac{\mr d\plr{1\p v^2}}{\plr{1\p v^2}^\frac32} \tl{17}$$$$ which integrated gives the solution $$$$\dfrac{\varepsilon_{\mr A}}{\sqrt{1\p u^2}} \e \dfrac{\varepsilon_{\mr B}}{\sqrt{1\p v^2}}\p \texttt{constant} \tl{18}$$$$ that is $$$$\cos\theta_{\mr A} \m \cos\theta_{\mr B} \e \texttt{constant} \tl{19}$$$$

To find the $$\:\texttt{constant}\:$$ we refer to Figure-02. For $$\:\theta_{\mr B} \e \pi\:$$ we have $$\:\theta_{\mr A} \e \theta\:$$ where $$\:\theta\:$$ the angle with respect to the $$\:\mr{Ox}\m$$axis of the tangent to the curve at point charge $$\:\m q$$. That is

$$$$\cos\theta_{\mr A} \m \cos\theta_{\mr B} \e \cos\theta \m \cos\pi \bl\implies \nonumber$$$$

$$$$\boxed{\:\:\cos\theta_{\mr A} \m \cos\theta_{\mr B} \e 1 \p \cos\theta\:\:\vp} \tl{20}$$$$

To give the parametric equations of this curve we make use of equations \eqref{04} \begin{align} x_\theta\plr{\theta_{\mr A}} & \e \dfrac{\tan\theta_{\mr B}\p\tan\theta_{\mr A}}{\tan\theta_{\mr B}\m\tan\theta_{\mr A}}\, a \tl{21a}\\ y_\theta\plr{\theta_{\mr A}} & \e \dfrac{2\tan\theta_{\mr B} \tan\theta_{\mr A}}{\tan\theta_{\mr B} \m \tan\theta_{\mr A}}\, a \tl{21b} \end{align} In above equation we replace the angle $$\:\theta_{\mr B}\:$$ as function of the angle $$\:\theta_{\mr A}\:$$ according to \eqref{20} $$$$\theta_{\mr B} \e \arccos\plr{\cos\theta_{\mr A}\m 1\m\cos\theta} \tl{22}$$$$ so the $$\:{\color{red}{\bl{\theta_{\mr A}}}}\m$$parametric equations for the $$\:{\color{blue}{\bl{\theta}}}\m$$parameter electric field line \begin{align} x_{\color{blue}{\bl\theta}}\plr{{\color{red}{\bl{\theta_{\mr A}}}}} & \e \dfrac{\tan\blr{\arccos\plr{\cos{\color{red}{\bl{\theta_{\mr A}}}}\m 1\m\cos{\color{blue}{\bl\theta}}\Vp{\tfrac{a}{b}}}\vp}\p\tan{\color{red}{\bl{\theta_{\mr A}}}}}{\tan\blr{\arccos\plr{\cos{\color{red}{\bl{\theta_{\mr A}}}}\m 1\m\cos{\color{blue}{\bl\theta}}\Vp{\tfrac{a}{b}}}\vp}\m\tan{\color{red}{\bl{\theta_{\mr A}}}}}\, a \tl{23a}\\ y_{\color{blue}{\bl\theta}}\plr{{\color{red}{\bl{\theta_{\mr A}}}}} & \e \dfrac{2\tan\blr{\arccos\plr{\cos{\color{red}{\bl{\theta_{\mr A}}}}\m 1\m\cos{\color{blue}{\bl\theta}}\Vp{\tfrac{a}{b}}}\vp}\tan{\color{red}{\bl{\theta_{\mr A}}}}}{\tan\blr{\arccos\plr{\cos{\color{red}{\bl{\theta_{\mr A}}}}\m 1\m\cos{\color{blue}{\bl\theta}}\Vp{\tfrac{a}{b}}}\vp}\m\tan{\color{red}{\bl{\theta_{\mr A}}}}}\, a \tl{23b}\\ \vp{\color{red}{\bl{\theta_{\mr A}}}} & \bl\in \blr{0,{\color{blue}{\bl\theta}}}\,, \qquad {\color{blue}{\bl\theta}}\bl\in \blr{0,\pi} \tl{23c} \end{align} The electric field line for $$\:{\color{blue}{\bl\theta}} \e 2\pi/3\:$$ is shown in Figure-02.

• Thank you so much for the other answer, Although I would prefer the Gauss's law answer because of its simplicity. Aug 7, 2023 at 0:58

$$\newcommand{\bl}[1]{\boldsymbol{#1}} \newcommand{\e}{\bl=} \newcommand{\p}{\bl+} \newcommand{\m}{\bl-} \newcommand{\mb}[1]{\mathbf {#1}} \newcommand{\mc}[1]{\mathcal {#1}} \newcommand{\mr}[1]{\mathrm {#1}} \newcommand{\mf}[1]{\mathfrak{#1}} \newcommand{\gr}{\bl>} \newcommand{\les}{\bl<} \newcommand{\greq}{\bl\ge} \newcommand{\leseq}{\bl\le} \newcommand{\il}[1]{\:#1\:} \newcommand{\plr}[1]{\left(#1\right)} \newcommand{\blr}[1]{\left[#1\right]} \newcommand{\clr}[1]{\left\{#1\right\}} \newcommand{\vlr}[1]{\left\vert#1\right\vert} \newcommand{\Vlr}[1]{\left\Vert#1\right\Vert} \newcommand{\lara}[1]{\left\langle#1\right\rangle} \newcommand{\lav}[1]{\left\langle#1\right|} \newcommand{\vra}[1]{\left|#1\right\rangle} \newcommand{\lavra}[2]{\left\langle#1|#2\right\rangle} \newcommand{\lavvra}[3]{\left\langle#1\right|#2\left|#3\right\rangle} \newcommand{\vp}{\vphantom{\dfrac{a}{b}}} \newcommand{\Vp}[1]{\vphantom{#1}} \newcommand{\hp}[1]{\hphantom{#1}} \newcommand{\tl}[1]{\tag{#1}\label{#1}}$$

Electric Field Lines of point charges on a straight line

Consider a finite number $$\:n\:$$ of point electric charges $$\:q_1,q_2,\cdots,q_k,\cdots,q_n\:$$ still on a straight line $$\:\ell$$, a point $$\:\mr P\:$$ on an electric field line of the produced electrostatic field and let $$\:\theta_k\:$$ the angle between the segment $$\:\mr Pq_k\:$$ and the line $$\:\ell$$, see Figure-01. Then along this electric field line

$$$$\boxed{\:\:q_1\cos\theta_1\p q_2\cos\theta_2\p\cdots \p q_k\cos\theta_k\p\cdots \p q_n\cos\theta_n \e \texttt{constant}\:\:\vp} \tl{A-01}$$$$

The proof is given by application of Gauss' Law on the closed surface shown in Figure-02 generated as follows(2) : on the field line we take two points $$\:\mr P\:$$ and $$\:\mr P'\:$$ by a finite distance apart and let the points $$\:\mr K\:$$ and $$\:\mr K'\:$$ their projections on the line $$\:\ell\:$$ respectively. We take care so that no electric charge to be in the straight segment $$\:\mr{KK'}$$. A truncated cone-like surface is formed with two bases the two circular disks $$\:\mr{PK},\mr{P'K'}\:$$ and lateral surface generated by a complete revolution of the field line segment $$\:\mr{PP'}\:$$ around the line $$\:\ell$$.

By Gauss' Law the total electric flux through this truncated cone-like surface is zero since its electric charge content is zero. But the electric flux through the lateral surface generated by $$\:\mr{PP'}\:$$ is zero since the electric field vector $$\:\mb E\:$$ is tangent to it at everyone of its points. So

Conclusion : The sum of the electric fluxes produced by all the point charges $$\:q_1,q_2,\cdots,q_k,\cdots,q_n\:$$ through the two circular disks $$\:\mr{PK},\mr{P'K'}\:$$ must be zero.

We'll determine the electric flux through the two circular disks $$\:\mr{PK},\mr{P'K'}\:$$ produced by a single point charge $$\:q_k\:$$ and then sum up for all charges. For this purpose we refer to Figure-03. The two disks $$\:\mr{PK},\mr{P'K'}\:$$ are oriented surfaces by $$^{\prime\prime}$$outwards$$^{\prime\prime}$$ normal unit vectors $$\:\mb n\:$$ and $$\:\mb n^\prime\:$$ respectively.

With the configuration of the Figure-03, that is the charge $$\:q_k\:$$ to the left of the disks, the fluxes through the disks $$\:\mr{PK},\mr{P'K'}\:$$ due to the charge $$\:q_k\:$$ are(1) \begin{align} \Phi_k\plr{\mr{PK}} & \e \m\dfrac{q_k}{2\epsilon_0}\plr{1\m \cos\theta_k} \tl{A-02a}\\ \Phi_k\plr{\mr{P'K'}} & \e \p\dfrac{q_k}{2\epsilon_0}\plr{1\m \cos\theta'_k} \tl{A-02b} \end{align} For the flux through both disks $$\:\mr{PK},\mr{P'K'}\:$$ due to the charge $$\:q_k\:$$ we have $$$$\Phi_k\plr{\mr{PK}\bl\cup\mr{P'K'}} \e \Phi_k\plr{\mr{PK}}\p\Phi_k\plr{\mr{P'K'}}\e \dfrac{q_k}{2\epsilon_0}\plr{\cos\theta_k\m \cos\theta'_k} \tl{A-03}$$$$

For the flux of all the point electric charges through both disks $$\:\mr{PK},\mr{P'K'}\:$$ we have $$$$\Phi\plr{\mr{PK}\bl\cup\mr{P'K'}}\e \sum\limits_{k\e 1}^{k\e n}\Phi_k\plr{\mr{PK}\bl\cup\mr{P'K'}} \e \dfrac{1}{2\epsilon_0} \sum\limits_{k\e 1}^{k\e n}q_k\plr{\cos\theta_k\m \cos\theta'_k} \tl{A-04}$$$$ But from the aforementioned Conclusion this flux must be zero, so $$$$\sum\limits_{k\e 1}^{k\e n}q_k\cos\theta_k \e \sum\limits_{k\e 1}^{k\e n}q_k\cos\theta'_k\e \texttt{constant} \tl{A-05}$$$$

$$\bl{=\!=\!=\!==\!=\!=\!==\!=\!=\!==\!=\!=\!==\!=\!=\!==\!=\!=\!==\!=\!=\!==\!=\!=\!==\!=\!=\!==\!=\!=\!==\!=\!=\!==\!=\!=\!=}$$

(1) For a proof of equations \eqref{A-02a} and \eqref{A-02b} see my answer here Electric field associated with moving charge, equations from (p-01) to (p-04).

$$\bl{-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-}$$

(2) Reference : $$^{\prime\prime}$$ The Mathematical Theory of Electricity and Magnetism$$^{\prime\prime}$$, by J.H.Jeans, Cambridge University Press, edition 1925 (reprinted 1927 - First Edition 1908 !!!), $$\bl{\S 68.}$$ The Lines of Force from collinear charges, pages 57-58.

$$\bl{-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-\!\!\!-}$$

• Excellent for also quoting from an old textbook and showing how much detail there used to be in older tomes. Nov 3, 2023 at 7:33

The electric field at $$P$$ is $$$$\tag{1} \vec{E} = q\left(\frac{\vec{r} - a\hat{x}}{PB^3} - \frac{\vec{r} + a\hat{x}}{PA^3}\right)$$$$ from which we get $$\begin{eqnarray} E_x &=& q\left(\frac{x - a}{PB^3} - \frac{x + a}{PA^3}\right) \\ E_y &=& q\left(\frac{y}{PB^3} - \frac{y}{PA^3}\right) \\ \end{eqnarray}$$ so that $$$$\frac{dy}{dx} = \frac{E_y}{E_x} = \frac{y(PA^3 - PB^3)}{x(PA^3 - PB^3) - a(PA^3 + PB^3)}.$$$$ That is, $$$$\frac{dy}{dx} = \frac{y}{x- a\frac{PA^3 + PB^3}{PA^3 - PB^3}} = \frac{y}{x + a\frac{PA^3 + PB^3}{PB^3 - PA^3}}.$$$$