Why is this a first integral? - particle near Schwarzschild black hole Background
I know that the Schwarzschild metric is:
$$d s^{2}=c^{2}\left(1-\frac{2 \mu}{r}\right) d t^{2}-\left(1-\frac{2 \mu}{r}\right)^{-1} d r^{2}-r^{2} d \Omega^{2}$$
I know that if I divide by $d \lambda^2$, I obtain the Lagrangian:
$$
L=c^{2}\left(1-\frac{2 \mu}{r}\right) \dot{t}^{2}-\left(1-\frac{2 \mu}{r}\right)^{-1} \dot{r}^{2}-r^{2} \dot{\theta}^{2}-r^{2} \sin ^{2} \theta \dot{\phi}^{2}
$$
(where we have also expanded $\Omega^{2}$ into $\theta$ and $\phi$ dependent parts but that's not tha main point).
Overdots denote differentiation with respect to affine parameter $\lambda$.
The Euler-Lagrange equations are:
$$\frac{\partial L}{\partial x^{\mu}}=\frac{d}{d \lambda}\left(\frac{\partial L}{\partial \dot{x}^{\mu}}\right)$$
Which is, for $x^{\mu}=r$, $\theta=\pi/2$, results in:
$$\left(1-\frac{2 \mu}{r}\right)^{-1} \ddot{r}+\frac{\mu c^{2}}{r^{2}} \dot{t}^{2}-\left(1-\frac{2 \mu}{r}\right)^{-2} \frac{\mu}{r^{2}} \dot{r}^{2}-r \dot{\phi}^{2}=0$$
Lets set $\theta=\pi/2$ for the remainder of this post.

The problem
I am happy with everything up to this point. Now my notes say:

However, it is often more convenient to use a further first integral
of the motion, which follows directly from $L = c^2$ for a massive
particle, and $L = 0$ for a massless one:

$$
\left(1-\frac{2 \mu}{r}\right) c^{2} \dot{t}^{2}-\left(1-\frac{2 \mu}{r}\right)^{-1} \dot{r}^{2}-r^{2} \dot{\phi}^{2}=\left\{\begin{array}{lc}
c^{2} & \text { massive } \\
0 & \text { massless }
\end{array}\right.
$$
Why is this called a first integral? Isn't this just the Lagrangian? My notes from another course has this to say on first integrals:

When $L\left(y(\lambda), y^{\prime}(\lambda) ; \lambda\right)$ has no explicit dependence on
$\lambda$, i.e. when $\frac{\partial L}{\partial \lambda}=0,$ then we have the
first integral

$$
\dot{y} \frac{\partial L}{\partial \dot{y}}-L=\mathrm{const.}
$$
So why does the above quote claim that the Lagrangian itself is the first integral? and why not $\dot{r} \frac{\partial L}{\partial \dot{r}}-L=\mathrm{const.}$ is my first integral?

Attempted resolution
Let's calculate $\dot{r} \frac{\partial L}{\partial \dot{r}}-L$, in the hope that it might reveal that $\dot{r} \frac{\partial L}{\partial \dot{r}}-L=\mathrm{const.}$ and $
L=\left\{\begin{array}{lc}
c^{2} & \text { massive } \\
0 & \text { massless }
\end{array}\right.
$ is the same thing put in a different way.
$\frac{\partial L}{\partial \dot{r}}=-2\left(1-\frac{2 V}{r}\right)^{-1} \dot{r}$
Then $\dot{r} \frac{\partial L}{\partial \dot{r}}-L$ becomes:
$$-\left(1-\frac{2 \mu}{r}\right) c^{2}\dot{t}^{2}-\left(1-\frac{2 \mu}{r}\right)^{-1} \dot{r}^{2}+r^{2} \dot{\phi}^{2}=\operatorname{const}$$
Flip signs, then, compare the two expressions:
$$\left(1-\frac{2 \mu}{r}\right) c^{2}\dot{t}^{2}\bbox[5px,border:3px solid green]{+}\left(1-\frac{2 \mu}{r}\right)^{-1} \dot{r}^{2}-r^{2} \dot{\phi}^{2}=-\operatorname{const}$$
$$
\left(1-\frac{2 \mu}{r}\right) c^{2} \dot{t}^{2}\bbox[5px,border:3px solid red]{-}\left(1-\frac{2 \mu}{r}\right)^{-1} \dot{r}^{2}-r^{2} \dot{\phi}^{2}=\left\{\begin{array}{lc}
c^{2} & \text { massive } \\
0 & \text { massless }
\end{array}\right.
$$
We can see that some signs differ if I believe that the first integral is $\dot{r} \frac{\partial L}{\partial \dot{r}}-L$ and not $L$ itself. I am pretty sure though that the result I get using $\dot{r} \frac{\partial L}{\partial \dot{r}}-L$ is wrong, since we use the other result throughout the lecture notes and it seem to be working.
I am mostly happy with the relation:
$$
\left(1-\frac{2 \mu}{r}\right) c^{2} \dot{t}^{2}\bbox[5px,border:3px solid red]{-}\left(1-\frac{2 \mu}{r}\right)^{-1} \dot{r}^{2}-r^{2} \dot{\phi}^{2}=\left\{\begin{array}{lc}
c^{2} & \text { massive } \\
0 & \text { massless }
\end{array}\right.
$$
This is true if the affine parameter is proper time and the particle is massive. (Then $ds^2=c^2d\tau^2$, so $ds^2/d\tau^2 = c^2$.) If the affine parameter cannot be proper time, then the particle travels with the $c$ and therefore it is a photon, which has null-like path, making $ds^2$ zero. I can make the leap of faith that if this is true for proper time as affine parameter it is true for non-proper time affine parameters.
I am also happy with the relation:
$$\left(1-\frac{2 \mu}{r}\right) c^{2}\dot{t}^{2}\bbox[5px,border:3px solid green]{+}\left(1-\frac{2 \mu}{r}\right)^{-1} \dot{r}^{2}-r^{2} \dot{\phi}^{2}=-\operatorname{const}$$
because the derivation seems correct.

Question reapproached
What I am not happy with is calling the first relation a first integral. It is probably rightly called that, an exam question (PDF page 24, third paragraph from bottom) asking for (I think) that equation saying "[...] use a simpler expression given by the first integral of the geodesic equations." So I think there is something here which I don't get.

Checking algebra of Othin's answer
As suggested, lets calculate $\dot{t}\frac{\partial L}{\partial \dot{t}} - L=\operatorname{const}$.
$$\frac{\partial L}{\partial t}=2 c^{2}\left(1-\frac{2 H}{r}\right) \dot{t}$$
Then
$$\dot{t}\frac{\partial L}{\partial \dot{t}} - L = \dot{t} 2 c^{2}\left(1-\frac{2 H}{r}\right) \dot{t} - \left(c^{2}\left(1-\frac{2 \mu}{r}\right) \dot{t}^{2}-\left(1-\frac{2 \mu}{r}\right)^{-1} \dot{r}^{2}-r^{2} \dot{\phi}^{2}\right)=\operatorname{const}$$
ie
$$c^{2}\left(1-\frac{2 H}{r}\right) \dot{t}^2 \bbox[5px,border:3px solid green]{+} \left(1-\frac{2 \mu}{r}\right)^{-1} \dot{r}^{2} \bbox[5px,border:3px solid green]{+} r^{2} \dot{\phi}^{2}=\operatorname{const}$$
Which is not $L$, but close. (Signs are wrong.)
 A: OP's phenomenon is much more general than the Schwarzschild solution. This happens e.g. whenever the Lagrangian $L(y,\dot{y},\lambda)$ satisfies the following 2 conditions:

*

*If $L$ does not depend explicitly on $\lambda$, then the energy
$$h~:=~\left(\dot{y}^i\frac{\partial }{\partial\dot{y}^i} -1\right)L \tag{1}$$
is a constant of motion (COM)/first integral (FI), cf. Noether's theorem.


*If moreover $L$ is homogeneous in the velocities $\dot{y}$ of weight $w\neq 1$, then the Lagrangian $$L~\stackrel{(1)}{=}~\frac{h}{w-1}\tag{2}$$ is also a COM/FI as well!
See also this related Math.SE post.
A: An integral of motion is anything that is conserved during the entire motion. The Lagrangian in this case is one such quantity. You don't want to calculate $\dot{r}\frac{\partial L}{\partial \dot{r}} - L=constant,$ because as you stated, this is valid for a variable doesn't appear in the Lagrangian. This is not the case for $r$, so $\partial L/\partial r$ isn't zero, and the formula doesn't give an integral of motion. What you want is $$\dot{t}\frac{\partial L}{\partial \dot{t}} - L=constant,$$ because there is no explicit dependence on $t$ in the Lagrangian, this is the constant you will use.
Edit concerning the use of the relation $\dot{r}\frac{\partial L}{\partial \dot{r}} - L=constant$. I think this quantity will indeed be constant. The reason is seen from derivation of the left hand side we get:
$$\frac{d}{d\lambda}\left(\dot{y}\frac{\partial L}{\partial\dot{y}} - L\right)= \ddot{y}\frac{\partial L}{\partial\dot{y}} + \frac{d}{d\lambda}\frac{\partial L}{\partial\dot{y}} - \left[\ddot{y}\frac{\partial L}{\partial\dot{y}}  +\frac{\partial L}{\partial y} + \frac{\partial L}{\partial \lambda}\right]. $$
This will be zero if $L$ has no explicit dependence on $\lambda$. I never tried it, but there should be a way to use this (with $y=r$) instead of the one I did, although it would probably be harder. Please notice that not all constants of motion are independent (for example, the Poisson bracket of two constants of motion is always a constant of motion, but usually  it won't be independent from the other known constants). In this case you have four conserved quantities (because of the four Killing vectors), and two of them have been used to fix $\theta=\pi/2$ (look up Sean Carroll's great book for more details on this last point) so the constant of motion you find from this method should be a combination of the two that are usually used (that is, the conservation of "energy" and of angular momentum), rather than a new one.
