Quantifying numerical error of the approximated square wave

44 Views Asked by At

From a numerical point of view, it makes sense the following statement \begin{equation} \lim_{A\to \infty}\int_0^{2\pi}\frac{\partial \arcsin^2\sin{x}}{\partial x} - \tanh^2\left( A\cos(x)\right)\,\mathrm{d}x= 0 \end{equation} The motivation here is to take $\cos(x)$ term to generate a square wave with simply by "ovedriving" the amplitude of the argument of the hyperbolic tangent in $\tanh\left( A\cos(x)\right)$. The powers of $2$ in the integral I used to obtain something like "energy" of the waves (as is usual in signal analysis in $L^2$) First term of the integral is the derivative of a triangle waveform producing overlapping square wave. If you take $A>200$ the error between two waveforms is negligible in numerical applications.

Q1: could you find an analytical solution of the second integrand? None of the software tools like Mathematica and \textsc{Matlab} were able to provide sufficient answer. What is wrong with the integral?

Q2: does this limit make sense in terms of continuity of the first integrand? Honestly, as I am dealing with triangle and square waveforms, I am pretty lost with the correct assumptions and existence thing. All I want to by this expression is that the error tends to zero as $A$ is increased, but I am not a professional, and it has been a long time I did this.

Q3: If the question Q2 is negative and there are some flaws, could you suggest me how to improve the jargon or how to generally polish the statement to make sense for both engineers (as it is now) and mathematicians?