\documentclass[11pt,fleqn]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% template that does not use Revtex4
%%% but allows special fonts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% Please use this template.
%%% Edit it using e.g. Notepad
%%% Ignore the header (do not change it)
%%% Process the file in the Latex site
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Page setup
\topmargin -1.5cm
\oddsidemargin -0.04cm
\evensidemargin -0.04cm
\textwidth 16.59cm
\textheight 24cm
\setlength{\parindent}{0cm}
\setlength{\parskip}{0cm}
% Fonts
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{bm}
\usepackage{graphicx}
% Math symbols I
\newcommand{\sinc}{\mbox{sinc}}
\newcommand{\const}{\mbox{const}}
\newcommand{\trc}{\mbox{trace}}
\newcommand{\intt}{\int\!\!\!\!\int }
\newcommand{\ointt}{\int\!\!\!\!\int\!\!\!\!\!\circ\ }
\newcommand{\ar}{\mathsf r}
\newcommand{\im}{\mbox{Im}}
\newcommand{\re}{\mbox{Re}}
% Math symbols II
\newcommand{\eexp}{\mbox{e}^}
\newcommand{\bra}{\left\langle}
\newcommand{\ket}{\right\rangle}
% Mass symbol
\newcommand{\mass}{\mathsf{m}}
\newcommand{\Mass}{\mathsf{M}}
% More math commands
\newcommand{\tbox}[1]{\mbox{\tiny #1}}
\newcommand{\bmsf}[1]{\bm{\mathsf{#1}}}
\newcommand{\amatrix}[1]{\begin{matrix} #1 \end{matrix}}
\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\eps}{\epsilon}
\newcommand{\fd}[2]{\frac{d #1}{d #2}}
\newcommand{\ffd}[2]{\frac{d^2 #1}{d #2^2}}
\newcommand{\fdl}[2]{(d #1/d #2)}
% Other commands
\newcommand{\hide}[1]{}
\newcommand{\drawline}{\begin{picture}(500,1)\line(1,0){500}\end{picture}}
\newcommand{\bitem}{$\bullet$ \ \ \ }
\newcommand{\Cn}[1]{\begin{center} #1 \end{center}}
\newcommand{\mpg}[2][1.0\hsize]{\begin{minipage}[b]{#1}{#2}\end{minipage}}
\newcommand{\Dn}{\vspace*{3mm}}
% Figures
\newcommand{\putgraph}[2][0.30\hsize]{\includegraphics[width=#1]{#2}}
% heading
\newcommand{\heading}[1]{\begin{center} \Large {#1} \end{center}}
\newcommand{\auname}[1]{\begin{center} \bf Submitted by: #1 \end{center}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% DO NOT EDIT BEFORE THIS LINE
%% START YOUR TEXT FROM HERE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\heading{Electric Potential}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% LEAVE THE PART BETWEEN THE COMMENTED LINES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{\bf The problem:}
\Dn
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
A thin wire of a length $L$ is positioned along the $x$-axis $-L/2L/2$?
\end{enumerate}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% LEAVE THE PART BETWEEN THE COMMENTED LINES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Dn
{\bf The solution:}
\Dn
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Since by definition $dq = \lambda dx$, the total charge is
%
\begin{eqnarray}
Q = \int dq = \int_{-L/2}^{L/2} \lambda dx = \int_{-L/2}^{L/2} \lambda_0 \frac{x}{L} \ dx
= 0
\end{eqnarray}
%
\Dn
The electric potential at $\vec r = (x,0,0)$ due to a charge element $dq$ at
$\vec r' = (x',0,0)$ is
%
\begin{eqnarray}
d\varphi(x) = k \frac{dq}{|\vec r - \vec r'|} = k \lambda_0\frac{ x'\ dx'}{L(x-x')}
\end{eqnarray}
%
The the electric potential is
%
\begin{eqnarray}
\varphi(x) &=& \int d\varphi(x')
= \frac{k \lambda_0}{L} \int_{-L/2}^{L/2}\frac{ x'\ dx'}{x-x'} \\
%
&=& -\frac{k \lambda_0}{L} \int_{-L/2}^{L/2}\frac{ x'\ dx'}{x'-x}
= -\frac{k \lambda_0}{L} \int_{-L/2}^{L/2}\frac{ x'-x + x }{x'-x} \ dx'\\
%
&=& -\frac{k \lambda_0}{L} \int_{-L/2}^{L/2}\left(1 + \frac{x }{x'-x}\right) \ dx'
= -\frac{k \lambda_0}{L} \left(L + x \ln\frac{L/2-x}{-L/2-x}\right)
\end{eqnarray}
%
Finally
%
\begin{eqnarray}
\varphi(x) = -\frac{k \lambda_0}{L} \left(L + x \ln\frac{x-L/2}{x+L/2}\right)
\end{eqnarray}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}