How to prove that $X\sim N(\sqrt\theta,1)$,then $X^2$ has non-central chi-square $\chi_1^2(\theta)$.
I can obtain the pdf of $X$, $f(x)=\frac{1}{\sqrt {2\pi}}\exp\left(-\frac{(x-\sqrt \theta)^2}{2}\right)$, I don't know how to get the pdf of $\chi^2_1(\theta)$ and how to get this result.
The statement is not true. In particular for $\theta=1$, we can see that $X\sim N(1,1)$, and $X^2\nsim \chi^2(1)$. On the other hand if $X\sim N(0,1)$, then $X^2\sim \chi ^2(1)$. To show that the statement is false, here are plots for $\theta=1$ and $\theta = 2:$
In the above plot, the red curve is the pdf of $\chi ^2(1)$, and the blue curve is the pdf of $X^2$ where $X\sim N(1,1)$ . Now consider $\theta=2:$
In this case the red curve is the pdf of $\chi ^2(2)$, and the blue curve is the pdf of $X^2$ where $X\sim N(\sqrt 2,1)$.
To prove that they are indeed different, we derive the pdf of $X^2$. Suppose we have $X\sim N(\sqrt \theta,1)$. Then for $x\ge 0$, \begin{align*} \mathbb P(X^2<x)&=\mathbb P(-\sqrt x<X<\sqrt x)=\mathbb P\left(\frac{-\sqrt{x}-\sqrt\theta}{1}<Z<\frac{\sqrt x-\sqrt \theta}{1}\right)\\ &=\Phi(\sqrt x-\sqrt \theta)-\Phi(-\sqrt x-\sqrt \theta) \end{align*} where $\Phi(.)$ is the cdf of $N(0,1)$. Differentiating, we get \begin{align*} \frac{d}{dx}\mathbb P(X^2<x)&=\phi(\sqrt x-\sqrt \theta)\frac{d}{dx}(\sqrt x-\sqrt\theta)-\phi(-\sqrt x-\sqrt \theta)\frac{d}{dx}(-\sqrt x-\sqrt\theta)\\ &= \frac{\phi(\sqrt x-\sqrt\theta)}{2\sqrt x}+\frac{\phi(-\sqrt x-\sqrt \theta)}{2\sqrt x}=\frac{\phi(\sqrt x-\sqrt\theta)+\phi(-\sqrt x-\sqrt\theta)}{2\sqrt x} \end{align*} where $\phi(x)=\frac{1}{\sqrt{2\pi}}\exp\left(-\frac{x^2}{2}\right)$ is the pdf of $N(0,1)$. Now we get \begin{align*} \frac{\phi(\sqrt x-\sqrt\theta)+\phi(-\sqrt x-\sqrt\theta)}{2\sqrt x}&=\frac{\frac{1}{\sqrt{2\pi}}\exp\left(-\frac{(\sqrt x-\sqrt \theta)^2}{2}\right)+\frac{1}{\sqrt {2\pi}}\exp\left(-\frac{(-\sqrt x-\sqrt \theta)^2}{2}\right)}{2\sqrt x}\\ &=\frac{\exp\left(-\frac{x-2\sqrt\theta\sqrt x+\theta}{2}\right)+\exp\left(-\frac{x+2\sqrt\theta\sqrt x+\theta}{2}\right)}{2\sqrt{2\pi}\cdot \sqrt x}\\ &= \frac{\exp\left(-\frac x2+\sqrt\theta\sqrt x-\frac\theta 2\right)+\exp\left(-\frac x2-\sqrt\theta\sqrt x-\frac\theta 2\right)}{2\sqrt{2\pi}\sqrt x} \end{align*} which is not the pdf of $\chi ^2(\theta)$.