We know from the usual pendulum differential equation that it involves the sine function, and to solve it, usually we use the small angle approximation. But to fully solve it, the method used is to get the first integral, suppose we have
$$\frac{d^2\theta}{dt^2} + B \sin(\theta) = 0$$
we can multiply both sides by $\frac{d\theta}{dt}$, so that
$$\frac{d\theta}{dt}\frac{d^2\theta}{dt^2} + B \sin(\theta)\frac{d\theta}{dt} = 0$$
then the first integral is,
$$\frac{d}{dt}\Bigg(\frac{1}{2} \Bigg(\frac{d\theta}{dt}\Bigg)^2 - B \cos(\theta) \Bigg) = 0 $$
Now, I have this nonlinear differential equation but it has a first order term in it instead of just the second order and the zeroth order,
$$\frac{d^2\theta}{dt^2} + A \frac{d\theta}{dt} + B \sin(\theta) = 0$$
$A$ and $B$ are just constants. How do I go about solving this? Is there a technique or other way to solve this?
$$\frac{d}{dt}\Bigg(\Bigg(\frac{d\theta}{dt}\Bigg)^2 - 2B \cos(\theta) \Bigg) = 0 $$ $$\Bigg(\frac{d\theta}{dt}\Bigg)^2 - 2B \cos(\theta) = c_1 $$ $$\frac{d\theta}{dt}=\pm \sqrt{2B \cos(\theta) +c_1}$$ $$dt=\frac{d\theta}{\sqrt{2B \cos(\theta) +c_1}}$$ $$t(\theta)=\int\frac{d\theta}{\sqrt{2B \cos(\theta) +c_1}}+c_2$$ Except in particular cases, this integral cannot be expressed with a finite number of elementary functions. See the special functions known as "Elliptic integrals".
Since we are looking for $\theta(t)$, the inverse function of $t(\theta)$ is requested. A closed form involves the Jacobi $\text{am}$ elliptic function: $$\theta(t)=2\:\text{am}\Big(\frac{1}{2}\sqrt{2B+c_1}(t-c_2)\Big|\frac{4B}{2B+c_1} \Big)$$ The initial conditions have to be taken into account, allowing to determine $c_1$ and $c_2$, which sometimes simplifies the result.
This complicated theoretical solution is often considerably simplified in replacing the trigonometric function by a linear approximate, around the initial point. This leads to an approximate solution expressed in term of simpler functions than the Jacobi elliptic.
Of course, on practical viewpoint, direct solving of the ODE thanks to numerical calculus might be a convenient way to be recommended.