Hi and welcome to the LaTeX community!
You need to call
\maketitle
after
\begin{document}
.
A few further remarks: you may want to add
to your preamble in order to get proper hyphenation and localization of strings like the date etc.
Also please note that
$$ ... $$
is plain TeX syntax and should be avoided in LaTeX. (for example it creates inconsistent spacing around displayed equations...). There are a number of alternatives provided by the amsmath package that you're loading already. Maybe you want to have a look at
mathtools. This doument gives a good overview over many of the math environments...
Also it is considered bad practice to add line breaks (
\\
) manually. Part of why LaTeX is so successful is its line-breaking algorithm. It breaks the lines by itself and usually does a very good job. Just remove all the
\\
in your code. (Then also the warnings about underfull \hboxes will go away...) If you want to start a new paragraph just leave an empty line in your code.
Here is a suggestion:
Code: Select all
\documentclass{article}
\usepackage[spanish]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathtools}
\DeclarePairedDelimiter\norm{\lVert}{\rVert}
\author{JCPK}
\title{Electro magnetismo}
\begin{document}
\maketitle
\[
\vec E = \int dE = \frac{1}{4\pi\epsilon_0}\int \frac{dq}{r^2} \vec r_u
\]
$\vec {B}$ producido por una corriente en un alambre largo y recto:
$Idl = Idx$.
\begin{align*}
r^{2} &= R^{2}+ x^2 \\
I d\vec{x} x \vec{r} &= I dx\sin\theta \\
\sin\theta &= \frac {R}{\sqrt {R^{2}+x^{2}}} \\
dB &= \frac{\epsilon_0}{4\pi} \frac{I dx \sin\theta}{x^{2}+R^{2}}
\end{align*}
Demostraci\'on \ldots
\[ \vec{B_p} = \frac{\mu_0 I}{2 \pi R} \]
El campo magn\'etico producido por una espira circular $I \vec{dl}$ y
$\vec{r}$ son perpendiculares
\begin{align*}
\norm{db} &= \frac{\mu_0 I dl \sin\theta}{4 \pi r^{2}} \\
&= \frac{\mu_0 I dl}{4 \pi r^{2}} \\
dB_x &= dB \cos{\theta} \\
dB_{\text{perp}} &= dB \sin\theta \quad\text{este se anula por simetr\'ia}
\end{align*}
\end {document}
Regards