
\documentclass{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{graphicx}
\usepackage{amsmath}

%TCIDATA{OutputFilter=LATEX.DLL}
%TCIDATA{Created=Fri Nov 04 13:02:47 2005}
%TCIDATA{LastRevised=Fri Nov 04 16:14:21 2005}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="DocumentShell" CONTENT="General\Blank Document">}
%TCIDATA{CSTFile=LaTeX article (bright).cst}
%TCIDATA{MapleDefs=
%$A=\left[ \MATRIX{3,3}{c}\VR{,,c,,,}{,,c,,,}{,,c,,,}{,,,,,}\HR{,,,}\CELL{a_{1}}\CELL{0}\CELL{0}\CELL{0}\CELL{a_{2}}\CELL{0}\CELL{0}\CELL{0}\CELL{a_{3}}\right] $
%$B=\left[ \MATRIX{3,3}{c}\VR{,,c,,,}{,,c,,,}{,,c,,,}{,,,,,}\HR{,,,}\CELL{b_{1}}\CELL{0}\CELL{0}\CELL{0}\CELL{b_{2}}\CELL{0}\CELL{0}\CELL{0}\CELL{b_{3}}\right] $
%$C=\left[ \MATRIX{1,3}{c}\VR{,,c,,,}{,,,,,}\HR{,,,}\CELL{c_{1}}\CELL{c_{2}}\CELL{c_{3}}\right] $
%$q=\left[ \MATRIX{1,3}{c}\VR{,,c,,,}{,,,,,}\HR{,,,}\CELL{q_{1}}\CELL{q_{2}}\CELL{q_{3}}\right] $
%$,$
%$s=\left[ \MATRIX{1,3}{c}\VR{,,c,,,}{,,,,,}\HR{,,,}\CELL{s_{1}}\CELL{s_{2}}\CELL{s_{3}}\right] $
%$t=\left[ \MATRIX{1,3}{c}\VR{,,c,,,}{,,,,,}\HR{,,,}\CELL{t_{1}}\CELL{t_{2}}\CELL{t_{3}}\right] $
%$w=\left[ \MATRIX{1,3}{c}\VR{,,c,,,}{,,,,,}\HR{,,,}\CELL{q_{1,1}^{2}}\CELL{q_{2,1}^{2}}\CELL{q_{3,1}^{2}}\right] $
%}


\newtheorem{theorem}{Theorem}
\newtheorem{acknowledgement}[theorem]{Acknowledgement}
\newtheorem{algorithm}[theorem]{Algorithm}
\newtheorem{axiom}[theorem]{Axiom}
\newtheorem{case}[theorem]{Case}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{conclusion}[theorem]{Conclusion}
\newtheorem{condition}[theorem]{Condition}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{criterion}[theorem]{Criterion}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{notation}[theorem]{Notation}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{solution}[theorem]{Solution}
\newtheorem{summary}[theorem]{Summary}
\newenvironment{proof}[1][Proof]{\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\input{tcilatex}

\begin{document}


$A=\left[ 
\begin{array}{ccc}
a_{1} & 0 & 0 \\ 
0 & a_{2} & 0 \\ 
0 & 0 & a_{3}
\end{array}
\right] $

$B=\left[ 
\begin{array}{ccc}
b_{1} & 0 & 0 \\ 
0 & b_{2} & 0 \\ 
0 & 0 & b_{3}
\end{array}
\right] $

$C=\left[ 
\begin{array}{c}
c_{1} \\ 
c_{2} \\ 
c_{3}
\end{array}
\right] $

$q=\left[ 
\begin{array}{c}
q_{1} \\ 
q_{2} \\ 
q_{3}
\end{array}
\right] $

$w=\left[ 
\begin{array}{c}
w_{1} \\ 
w_{2} \\ 
w_{3}
\end{array}
\right] $

$w=\left[ 
\begin{array}{c}
q_{1,1}^{2} \\ 
q_{2,1}^{2} \\ 
q_{3,1}^{2}
\end{array}
\right] $

$Q=q_{1,1}+q_{2,1}+q_{3,1}=\allowbreak q_{1}+q_{2}+q_{3}$

$\left[ 
\begin{array}{c}
1 \\ 
1 \\ 
1
\end{array}
\right] dP=\left[ 
\begin{array}{ccc}
S_{1} & 0 & 0 \\ 
0 & S_{2} & 0 \\ 
0 & 0 & S_{3}
\end{array}
\right] \left( Aw+Bq+C\right) \allowbreak \allowbreak =\allowbreak \left[ 
\begin{array}{c}
S_{1}\left( a_{1}q_{1}^{2}+b_{1}q_{1}+c_{1}\right)  \\ 
S_{2}\left( a_{2}q_{2}^{2}+b_{2}q_{2}+c_{2}\right)  \\ 
S_{3}\left( a_{3}q_{3}^{2}+b_{3}q_{3}+c_{3}\right) 
\end{array}
\right] \allowbreak $

$Q=q_{1}+q_{2}$

$S_{2}\left( a_{2}(Q-q_{1})^{2}+b_{2}(Q-q_{1})+c_{2}\right) =S_{1}\left(
a_{1}q_{1}^{2}+b_{1}q_{1}+c_{1}\right) $, Solution is : $\left\{ q_{1}=\frac{%
1}{2\left( S_{2}a_{2}-S_{1}a_{1}\right) }\left(
2S_{2}a_{2}Q+S_{1}b_{1}+S_{2}b_{2}+\sqrt{\left(
4S_{2}a_{2}QS_{1}b_{1}+S_{1}^{2}b_{1}^{2}+2S_{1}b_{1}S_{2}b_{2}+S_{2}^{2}b_{2}^{2}-4S_{2}^{2}a_{2}c_{2}+4S_{2}a_{2}S_{1}c_{1}+4S_{1}a_{1}S_{2}a_{2}Q^{2}+4S_{1}a_{1}S_{2}c_{2}+4S_{1}a_{1}S_{2}b_{2}Q-4S_{1}^{2}a_{1}c_{1}\right) 
}\right) \right\} ,\allowbreak \left\{ q_{1}=\frac{1}{2\left(
S_{2}a_{2}-S_{1}a_{1}\right) }\left( 2S_{2}a_{2}Q+S_{1}b_{1}+S_{2}b_{2}-%
\sqrt{\left(
4S_{2}a_{2}QS_{1}b_{1}+S_{1}^{2}b_{1}^{2}+2S_{1}b_{1}S_{2}b_{2}+S_{2}^{2}b_{2}^{2}-4S_{2}^{2}a_{2}c_{2}+4S_{2}a_{2}S_{1}c_{1}+4S_{1}a_{1}S_{2}a_{2}Q^{2}+4S_{1}a_{1}S_{2}c_{2}+4S_{1}a_{1}S_{2}b_{2}Q-4S_{1}^{2}a_{1}c_{1}\right) 
}\right) \right\} \allowbreak $

$q_{1}=\frac{1}{2\left( S_{2}a_{2}-S_{1}a_{1}\right) }\left(
2S_{2}a_{2}Q+S_{1}b_{1}+S_{2}b_{2}-\sqrt{\left(
4S_{2}a_{2}QS_{1}b_{1}+S_{1}^{2}b_{1}^{2}+2S_{1}b_{1}S_{2}b_{2}+S_{2}^{2}b_{2}^{2}-4S_{2}^{2}a_{2}c_{2}+4S_{2}a_{2}S_{1}c_{1}+4S_{1}a_{1}S_{2}a_{2}Q^{2}+4S_{1}a_{1}S_{2}c_{2}+4S_{1}a_{1}S_{2}b_{2}Q-4S_{1}^{2}a_{1}c_{1}\right) 
}\right) $

\end{document}
