Not sure how to describe my problem since the situation is weird . Recently I found that Overleaf would automatically "misplace" the math mode . For example " $ \lim_{ n \to \infty} a_n $ " will become " lim n→∞ an \lim_{n \to infty} a_n " , the dollar symbol is removed and the symbols are copied pasted . I'm sure this is not typo becuse it happens so frequently . Did anyone also encounter this problem ?
Here is a part of my code (automatically misplaced version)
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{CJKutf8}
\usepackage{amsmath}
\usepackage{bm}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{cancel}
\usepackage[margin=2cm]{geometry}
\title{AP exercise ch10}
\date{}
\begin{document}
\maketitle\noindent
\textbf{Exercise 10.1.4} \\
We observe that if x<12x < \frac{1}{2} , ψ(x)=2x<1\psi(x) = 2x < 1
and if 12<x<1 \frac{1}{2} < x < 1 , ψ(x)=2x−1\psi(x) = 2x - 1 .
So for any [a,b]⊂[0,1)[a,b] \subset [ 0 , 1 ) , we separate
ψ−1([a,b])\psi^{-1}([a,b]) into
two parts i.e
\begin{align*}
\psi^{-1}( [ a , b ] ) \cap [0 , \frac{1}{2} ) & =
\{ x \in [ 0 , 1 ) \; \rvert \;
x < \frac{1}{2} \; , \; x \in
[ \frac{a}{2} , \frac{b}{2}] \}
= [\frac{a}{2} , \frac{b}{2}]
\\
\psi^{-1}( [ a , b ] ) \cap (\frac{1}{2} , 1 ) &=
\{ x \in [ 0 , 1 ) \; \rvert \;
\frac{1}{2} < x < 1 \; , \; x \in
[ \frac{1+a}{2} , \frac{1+b}{2}] \}
= [\frac{1+a}{2} , \frac{1+b}{2}]
\end{align*}
Hence $\mu(\psi^{-1}([a,b])) =
\mu( [\frac{a}{2} , \frac{b}{2} ])
+ \mu([\frac{1+a}{2} , \frac{1+b}{2}] ) = b- a = \mu([b,a])$ .

^and\inin text, surely you get multiple errors from that input? The pdf is not intended to be usable after any error – David Carlisle Apr 07 '23 at 11:28x<12x < \frac{1}{2}should be$x<12x < \frac{1}{2}$for example – David Carlisle Apr 07 '23 at 11:58