  Let $E:y^2=x^3+Ax^2+Bx+C$ be a nonconstant elliptic curve over
$\mathbb{Q}(t)$ with at least one nontrivial $\mathbb{Q}(t)$-rational
$2$-torsion point. We describe a method for finding $t_0\in\mathbb Q$ for which
the corresponding specialization homomorphism $t\mapsto t_0\in\mathbb{Q}$ is
injective. The method can be directly extended to elliptic curves over $K(t)$
for a number field $K$ of class number $1$, and in principal for arbitrary
number field $K$. One can use this method to calculate the rank of elliptic
curves over $\mathbb Q(t)$ of the form as above, and to prove that given points
are free generators. In this paper we illustrate it on some elliptic curves
over $\mathbb Q(t)$ from an article by Mestre.
