\documentclass[a4paper,openany,12pt,twocolumn,fleqn]{book}

\usepackage{graphicx}\usepackage{amsthm,amsmath}
\usepackage{amssymb}\usepackage{mathrsfs}
\usepackage{fancybox}\usepackage{fancyhdr}
\usepackage[all]{xy}\usepackage{setspace}

\RequirePackage{hyperref}
\hypersetup{colorlinks=true,linkcolor=red,citecolor=green,%
filecolor=magneta,urlcolor=cyan}
\usepackage{color}\usepackage{xecolour}
\usepackage[Kashida]{xepersian}
\settextfont{Yas}
\setdigitfont{PGaramond}


\pagestyle{fancy}
% with this we ensure that the chapter and section
% headings are in lowercase.
\renewcommand{\chaptermark}[1]{%
        \markboth{#1}{}}
\renewcommand{\sectionmark}[1]{%
        \markright{\thesection\ #1}}
\fancyhf{} % delete current header and footer
\fancyhead[RO]{\slshape\leftmark}
\fancyhead[LE]{\slshape\rightmark}
\fancyhead[LO,RE]{\slshape \thepage}
\renewcommand{\headrulewidth}{0.4pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\onehalfspace
\defpersianfont\nastaliq[Scale=1]{IranNastaliq}
\def\حل{{\textbf{\green{ حل.} }}}


\newcommand\خط‌من{\par \vspace{12pt} {%\color{red}
 \hrule height .5pt}\vspace{12pt}} 

\renewcommand{\baselinestretch}{1.7}
\begin{document}
سلام
\begin{eqnarray*}
x^{2}\geq 0&&\Longrightarrow x^{2}+1\geq 1\\
&&\Longrightarrow y\geq 1  
\end{eqnarray*}
بنابراین برد تابع برابر $ [1,+\infty) $ می‌باشد.
\begin{flushleft}
$x+1=0\Longrightarrow x=-1$
\end{flushleft}
شکل
\begin{equation*}
f^{2}(-x)=f(-x)f(-x)=f^{2}(x)
 \end{equation*}
سوال 31.

\حل
\end{document}