Is the period of a harmonic oscillator really independent of amplitude? Say we have a harmonic oscillator that obeys the force rule:
$$F=-kx$$
Hence, the equation of motion is:
$$\ddot{x}+\frac{k}{m}x=0$$
which may be solved analytically as:
$$x(t)=x(0)\cos\left(\sqrt{\frac{k}{m}}t\right)+\frac{\dot{x}(0)}{\sqrt{\frac{k}{m}}}\sin\left(\sqrt{\frac{k}{m}}t\right)$$
from which it is clear that the period of its oscillation in time is given by $T=2\pi\sqrt{\frac{m}{k}}$. Now, as I understand the term "amplitude", it refers to the maximum displacement of the harmonic oscillator from its equilibrium position, which in this case is simply the origin of the $x$-axis. It follows that by setting $\dot{x}(t):=0$, finding the value of $t$ that satisfies this (there are infinitely many, but we just need one), and then plugging that value of $t$ into the function $x(t)$, I should get the amplitude of the oscillation. If we call that special $t$-value $t=t^*$, here is what I get:
$$x(t^*)=\frac{x(0)|x(0)|\sqrt{\frac{k}{m}}+\dot{x}(0)|\dot{x}(0)|\sqrt\frac{m}{k}}{\sqrt{\dot{x}(0)^2+x(0)^2\frac{k}{m}}}=A$$
where $A$ stands for amplitude. But if you make the substitution $T=2\pi\sqrt{\frac{m}{k}}$ everywhere you can in that expression, then you can check that $\frac{\partial{A}}{\partial{T}}\neq{0}$, and therefore it seems that the statement "period is independent of amplitude" (also known as the property of isochronism) is wrong? One way I found to make that statement correct is to assume that the harmonic oscillator starts at rest (i.e. $\dot{x}(0)=0$), but I'm not sure if people only meant for that phrase to apply to this starting-at-rest situation or if it was intended to have a more general applicability.
 A: The period is independent of the amplitude keeping $k$ and $m$ fixed (and varying initial conditions). Your calculation tries to keep the initial conditions fixed and vary $k$ and $m.$
A: I'm not sure why you're making this so complicated.  Write
\begin{align}
x(t)=A\cos(\omega t)+B\sin(\omega t) \, ,\tag{1}
\end{align}
where $\omega^2=k/m$, $A=x(0)$ and $B= \dot{x}(0)/\omega$.  Since $x(0)$ and
$\dot{x}(0)$ are arbitrary, so are $A$ and $B$.
Now rewrite (1) as
\begin{align}
x(t)=C\cos(\omega t-\varphi)=C\cos(\varphi)\cos(\omega t)+C\sin(\varphi)\sin(\omega t) 
\end{align}
so clearly $A=C\cos(\varphi)$ and $B=C\sin(\varphi)$.
Obviously in this form the amplitude $C=\sqrt{A^2+B^2}$ is arbitrary (since $A$ and $B$ are arbitrary) and does
not depend on $\omega$.  Now the amplitude $C$ depends on the initial conditions through
\begin{align}
C=\sqrt{x^2(0)+\dot{x}^2(0)/\omega^2} \tag{2}
\end{align}
but you still have the freedom to choose
$x(0)$ and $\dot{x}(0)$ to make $C$ whatever you want, irrespective of $\omega$.
