I've been working on a TikZ drawing, specifically a circle, inside a square, inside a circle, and so on (I think it's called inscribed and circumscribed circles and squares). This is my code so far (this is also a MWE):
\documentclass[tikz, 11pt, border=1cm]{standalone}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
%First Iteration
\draw (-5,-5) rectangle (5,5);
\draw (0,0) circle (5);
%Second Iteration
\draw ($cos(45)*(-5,-5)$) rectangle ($cos(45)*(5,5)$);
\draw (0,0) circle (5*cos(45));
\end{tikzpicture}
\end{document}
I did the first iteration with no problems whatsoever, however, while doing the second iteration, while trying to do the second circle (after the second square), my editor pointed an error stating that there's a missing semicolon in such line (\draw (0,0) circle (5*cos(45));), despite, there is a semicolon at the end of the line, and I don't know what's wrong about it.
What can I do?

)of thecosfunction needs to be protected (ref 2):({5*cos(45)})but that syntax is outdated anyway, better is:circle[radius=5*cos(45)], though there you need to protect possible,. – Qrrbrbirlbel Dec 09 '22 at 16:16