我有一些很长的微分方程,我不知道如何按照我想要的方式格式化它们。我希望它们看起来像这样:dx/dt = blah blah blah blah dx/dt = blah blah blah blah 等等。我遇到了它们不左对齐和超出页面的问题。感谢您的帮助!
\documentclass{article}
\title{Equations}
\usepackage{amsmath}
\begin{document}
\begin{multline}
\frac{dx_{1}}{dt}= - c_{1}*x_{2}*x_{1} + c_{2}*x_{3} - c_{3}*x_{25}*x_{1}\\ + c_{4}*x_{5} - c_{5}*x_{1}*x_{26} + c_{6}*x_{4} - c_{7}*x_{1}*x_{13}\\ + c_{8}*x_{12} - c_{9}*x_{1}*x_{18} + c_{10}*x_{17} - c_{11}*x_{1}*x_{24} + c_{12}*x_{23} - c_{13}*x_{1}*x_{19}\\ + c_{14}*x_{20}\
\frac{dx_{2}}{dt}= - c_{1}*x_{1}*x_{2} + c_{2}*x_{3} - c_{1}*x_{2}*(x_{4}\\ + x_{5} + x_{7} + x_{12} + x_{14} + x_{17} + x_{20} + x_{23}) - c_{15}*(x_{6}\\ + x_{8} + x_{9} + x_{11} + x_{15} + x_{16} + x_{21} + x_{22})\
\frac{dx_{3}}{dt}= - c_{16}*x_{3}*x_{26} + c_{17}*x_{6}\\ - c_{18}*x_{3}*x_{25} + c_{19}*x_{8} + c_{1}*x_{1}*x_{2} - c_{2}*x_{3} - c_{7}*x_{3}*x_{13}\\ + c_{8}*x_{11} - c_{9}*x_{3}*x_{18} + c_{10}*x_{16} - c_{11}*x_{3}*x_{24} + c_{12}*x_{22}\
\frac{dx_{4}}{dt}= c_{5}*x_{1}*x_{26} - c_{6}*x_{4} - c_{3}*x_{4}*x_{25}\\ + c_{4}*x_{7} - c_{1}*x_{4}*x_{2} + c_{15}*x_{6}\
\frac{dx_{5}}{dt}= c_{3}*x_{1}*x_{25} - c_{4}*x_{5} - c_{5}*x_{5}*x_{26}\\ + c_{6}*x_{7} - c_{1}*x_{2}*x_{5} + c_{15}*x_{8}\
\frac{dx_{6}}{dt}= c_{16}*x_{3}*x_{26} - c_{17}*x_{6} - c_{18}*x_{6}*x_{25}\\ + c_{19}*x_{9} - c_{15}*x_{6} + c_{1}*x_{2}*x_{4}\
\frac{dx_{7}}{dt}= c_{5}*x_{5}*x_{26} - c_{6}*x_{7} + c_{3}*x_{4}*x_{25}\\ - c_{4}*x_{7} - c_{1}*x_{7}*x_{2} + c_{15}*x_{9} - c_{22}*x_{7}\
\frac{dx_{8}}{dt}= c_{18}*x_{3}*x_{25} - c_{19}*x_{8} - c_{16}*x_{8}*x_{26}\\ + c_{17}*x_{9} - c_{15}*x_{8} + c_{1}*x_{2}*x_{5}\
\frac{dx_{9}}{dt}= c_{16}*x_{8}*x_{26} - c_{17}*x_{9} + c_{18}*x_{6}*x_{25}\\ - c_{19}*x_{9} + c_{1}*x_{2}*x_{7} - c_{15}*x_{9} - c_{20}*x_{9}\
\frac{dx_{10}}{dt}= (c_{20}*x_{9}*(1 - c_{23})\\ + c_{22}*x_{7}*(1 - c_{24}))*c_{25}^{c_{26}} - x_{10}\
\frac{dx_{11}}{dt}= c_{20}*c_{23}*x_{9} - c_{15}*x_{11}\\ + c_{1}*x_{2}*x_{12} - c_{13}*x_{11}*x_{19} + c_{14}*x_{15} + c_{7}*x_{3}*x_{13}\\ - c_{8}*x_{11}\
\frac{dx_{12}}{dt}= c_{22}*x_{7}*c_{24} + c_{7}*x_{1}*x_{13}\\ - c_{8}*x_{12} - c_{1}*x_{12}*x_{2} + c_{15}*x_{11} - c_{13}*x_{12}*x_{19}\\ + c_{14}*x_{14}\
\frac{dx_{13}}{dt}= - c_{7}*x_{13}*(x_{1} + x_{3} + x_{20} + x_{21})\\ + c_{8}*(x_{11} + x_{12} + x_{14} + x_{15})\
\frac{dx_{14}}{dt}= c_{13}*x_{12}*x_{19} - c_{14}*x_{14}\\ - c_{1}*x_{2}*x_{14} + c_{15}*x_{15} + c_{7}*x_{20}*x_{13} - c_{8}*x_{14}\
\frac{dx_{15}}{dt}= c_{1}*x_{2}*x_{14} - c_{15}*x_{15}\\ + c_{13}*x_{11}*x_{19} - c_{14}*x_{15} - c_{21}*x_{15} + c_{7}*x_{21}*x_{13} - c_{8}*x_{15}\
\frac{dx_{16}}{dt}= c_{20}*(1 - c_{23})*x_{9} - c_{15}*x_{16}\\ + c_{1}*x_{2}*x_{17} + c_{9}*x_{3}*x_{18} - c_{10}*x_{16}\
\frac{dx_{17}}{dt}= c_{22}*(1 - c_{24})*x_{7} + c_{15}*x_{16}\\ - c_{1}*x_{2}*x_{17} + c_{9}*x_{1}*x_{18} - c_{10}*x_{17}\
\frac{dx_{18}}{dt}= - c_{9}*x_{18}*(x_{1} + x_{3})\\ + c_{10}*(x_{17} + x_{16})\
\frac{dx_{19}}{dt}= c_{20}*(1 - c_{23})*x_{9}\\ - c_{13}*x_{19}*(x_{12} + x_{1}) + c_{14}*(x_{14} + x_{20}) + c_{22}*(1 - c_{24})*x_{7}\
\frac{dx_{20}}{dt}= c_{13}*x_{1}*x_{19} - c_{14}*x_{20}\\ - c_{1}*x_{2}*x_{20} + c_{15}*x_{21} - c_{7}*x_{20}*x_{13} + c_{8}*x_{14}\
\frac{dx_{21}}{dt}= c_{1}*x_{2}*x_{20} - c_{15}*x_{21}\\ - c_{7}*x_{21}*x_{13} + x_{8}*x_{15}\
\frac{dx_{22}}{dt}= c_{21}*x_{15} - c_{15}*x_{22} + c_{1}*x_{2}*x_{23}\\ + c_{11}*x_{3}*x_{24} - c_{12}*x_{22}\
\frac{dx_{23}}{dt}= c_{11}*x_{1}*x_{24} - c_{12}*x_{23}\\ - c_{1}*x_{2}*x_{23} + c_{15}*x_{22}\
\frac{dx_{24}}{dt}= - c_{11}*x_{24}*(x_{1} + x_{3})\\ + c_{12}*(x_{23} + x_{22})\
\frac{dx_{25}}{dt}= - c_{3}*x_{25}*(x_{1} + x_{4})\\ + c_{4}*(x_{5} + x_{7}) - c_{18}*x_{25}*(x_{3} + x_{6}) + c_{19}*(x_{8} + x_{9})\
\frac{dx_{26}}{dt}= - c_{5}*x_{26}*(x_{1} + x_{5})\\ + c_{6}*(x_{4} + x_{7}) - c_{16}*x_{26}*(x_{3} + x_{8}) + c_{17}*(x_{6} + x_{9})\
\end{multline}
\end{document}
答案1
请在发布之前测试您的代码。
如果我删除明显的错误,例如在数学环境\[
中使用 启动数学模式multline
,那么除了前三个长方程式外,它大部分都适合一页。gathered
这里使用 ,但split
或aligned
是替代方案。我还使用align
而不是 来表示主列表,multline
并使用并置而不是*
乘法。
\documentclass{article}
\title{Equations}
\usepackage{amsmath}
\allowdisplaybreaks
\begin{document}
\begin{align*}
\frac{dx_{1}}{dt}&= \begin{gathered}- c_{1}x_{2}x_{1} + c_{2}x_{3} - c_{3}x_{25}x_{1} + c_{4}x_{5} - c_{5}x_{1}x_{26} + c_{6}x_{4} - c_{7}x_{1}x_{13}\\
+ c_{8}x_{12} - c_{9}x_{1}x_{18} + c_{10}x_{17} - c_{11}x_{1}x_{24} + c_{12}x_{23} - c_{13}x_{1}x_{19} + c_{14}x_{20}\end{gathered}\\
\frac{dx_{2}}{dt}&= \begin{gathered}-- c_{1}x_{1}x_{2} + c_{2}x_{3} - c_{1}x_{2}(x_{4} + x_{5} + x_{7} + x_{12} + x_{14} + x_{17}\\
+ x_{20} + x_{23}) - c_{15}(x_{6} + x_{8} + x_{9} + x_{11} + x_{15} + x_{16} + x_{21} + x_{22})\end{gathered}\\
\frac{dx_{3}}{dt}&=\begin{gathered} - c_{16}x_{3}x_{26} + c_{17}x_{6} - c_{18}x_{3}x_{25} + c_{19}x_{8} + c_{1}x_{1}x_{2} - c_{2}x_{3}\\
- c_{7}x_{3}x_{13} + c_{8}x_{11} - c_{9}x_{3}x_{18} + c_{10}x_{16} - c_{11}x_{3}x_{24} + c_{12}x_{22}\end{gathered}\\
\frac{dx_{4}}{dt}&= c_{5}x_{1}x_{26} - c_{6}x_{4} - c_{3}x_{4}x_{25} + c_{4}x_{7} - c_{1}x_{4}x_{2} + c_{15}x_{6}\\
\frac{dx_{5}}{dt}&= c_{3}x_{1}x_{25} - c_{4}x_{5} - c_{5}x_{5}x_{26} + c_{6}x_{7} - c_{1}x_{2}x_{5} + c_{15}x_{8}\\
\frac{dx_{6}}{dt}&= c_{16}x_{3}x_{26} - c_{17}x_{6} - c_{18}x_{6}x_{25} + c_{19}x_{9} - c_{15}x_{6} + c_{1}x_{2}x_{4}\\
\frac{dx_{7}}{dt}&= c_{5}x_{5}x_{26} - c_{6}x_{7} + c_{3}x_{4}x_{25} - c_{4}x_{7} - c_{1}x_{7}x_{2} + c_{15}x_{9} - c_{22}x_{7}\\
\frac{dx_{8}}{dt}&= c_{18}x_{3}x_{25} - c_{19}x_{8} - c_{16}x_{8}x_{26} + c_{17}x_{9} - c_{15}x_{8} + c_{1}x_{2}x_{5}\\
\frac{dx_{9}}{dt}&= c_{16}x_{8}x_{26} - c_{17}x_{9} + c_{18}x_{6}x_{25} - c_{19}x_{9} + c_{1}x_{2}x_{7} - c_{15}x_{9} - c_{20}x_{9}\\
\frac{dx_{10}}{dt}&= (c_{20}x_{9}(1 - c_{23}) + c_{22}x_{7}(1 - c_{24}))c_{25}c_{26} - x_{10}\\
\frac{dx_{11}}{dt}&= c_{20}c_{23}x_{9} - c_{15}x_{11} + c_{1}x_{2}x_{12} - c_{13}x_{11}x_{19} + c_{14}x_{15} + c_{7}x_{3}x_{13} - c_{8}x_{11}\\
\frac{dx_{12}}{dt}&= c_{22}x_{7}c_{24} + c_{7}x_{1}x_{13} - c_{8}x_{12} - c_{1}x_{12}x_{2} + c_{15}x_{11} - c_{13}x_{12}x_{19} + c_{14}x_{14}\\
\frac{dx_{13}}{dt}&= - c_{7}x_{13}(x_{1} + x_{3} + x_{20} + x_{21}) + c_{8}(x_{11} + x_{12} + x_{14} + x_{15})\\
\frac{dx_{14}}{dt}&= c_{13}x_{12}x_{19} - c_{14}x_{14} - c_{1}x_{2}x_{14} + c_{15}x_{15} + c_{7}x_{20}x_{13} - c_{8}x_{14}\\
\frac{dx_{15}}{dt}&= c_{1}x_{2}x_{14} - c_{15}x_{15} + c_{13}x_{11}x_{19} - c_{14}x_{15} - c_{21}x_{15} + c_{7}x_{21}x_{13} - c_{8}x_{15}\\
\frac{dx_{16}}{dt}&= c_{20}(1 - c_{23})x_{9} - c_{15}x_{16} + c_{1}x_{2}x_{17} + c_{9}x_{3}x_{18} - c_{10}x_{16}\\
\frac{dx_{17}}{dt}&= c_{22}(1 - c_{24})x_{7} + c_{15}x_{16} - c_{1}x_{2}x_{17} + c_{9}x_{1}x_{18} - c_{10}x_{17}\\
\frac{dx_{18}}{dt}&= - c_{9}x_{18}(x_{1} + x_{3}) + c_{10}(x_{17} + x_{16})\\
\frac{dx_{19}}{dt}&= c_{20}(1 - c_{23})x_{9} - c_{13}x_{19}(x_{12} + x_{1}) + c_{14}(x_{14} + x_{20}) + c_{22}(1 - c_{24})x_{7}\\
\frac{dx_{20}}{dt}&= c_{13}x_{1}x_{19} - c_{14}x_{20} - c_{1}x_{2}x_{20} + c_{15}x_{21} - c_{7}x_{20}x_{13} + c_{8}x_{14}\\
\frac{dx_{21}}{dt}&= c_{1}x_{2}x_{20} - c_{15}x_{21} - c_{7}x_{21}x_{13} + x_{8}x_{15}\\
\frac{dx_{22}}{dt}&= c_{21}x_{15} - c_{15}x_{22} + c_{1}x_{2}x_{23} + c_{11}x_{3}x_{24} - c_{12}x_{22}\\
\frac{dx_{23}}{dt}&= c_{11}x_{1}x_{24} - c_{12}x_{23} - c_{1}x_{2}x_{23} + c_{15}x_{22}\\
\frac{dx_{24}}{dt}&= - c_{11}x_{24}(x_{1} + x_{3}) + c_{12}(x_{23} + x_{22})\\
\frac{dx_{25}}{dt}&= - c_{3}x_{25}(x_{1} + x_{4}) + c_{4}(x_{5} + x_{7}) - c_{18}x_{25}(x_{3} + x_{6}) + c_{19}(x_{8} + x_{9})\\
\frac{dx_{26}}{dt}&= - c_{5}x_{26}(x_{1} + x_{5}) + c_{6}(x_{4} + x_{7}) - c_{16}x_{26}(x_{3} + x_{8}) + c_{17}(x_{6} + x_{9})
\end{align*}
\end{document}