Quantcast
Channel: Active questions tagged mathtools - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 124

How to right align \intertext and \shortintertext

$
0
0

Currently shortintertext is left aligned, how to make it right aligned? using \raggedright doesnt work

MWE

\documentclass{article}\usepackage{amsmath, mathtools}\usepackage{derivative} % Derivative\makeatletter\newcommand*\yesnumber{\incr@eqnum\tag{\theequation}}\makeatother\begin{document}\begin{flalign*}\label{eq:1.1-y}&   y  = \frac{c_0}{\varphi(x)}+ \frac{1  }{\varphi(x)}  \,\int{\left(\frac{1}{4}\,x^3\right)\,\varphi(x)\,\odif{x}}  %  %  %  = & \\[3ex] \shortintertext{\raggedright Using \eqref{eq:1.1-phi_x}} &   % & \text{Using \eqref{eq:1.1-phi_x}} \\&   = \frac{c_0}{\left(c_1\,e^{x^2/8}\right)}+ \frac{1  }{\left(c_1\,e^{x^2/8}\right)}  \,\int{\left(\frac{1}{4}\,x^3\right)\,\left(c_1\,e^{x^2/8}\right)\,\odif{x}}  = &\\&   = \frac{c_0}{\left(c_1\,e^{x^2/8}\right)}+ \frac{1  }{e^{x^2/8}}  \,\int{\left(\frac{1}{4}\,x^3\right)\,\left(e^{x^2/8}\right)\,\odif{x}}  = &\\& & \\ \shortintertext{\raggedright Using \eqref{eq:1.1-prim}} &   = c_2\,e^{-x^2/8}+ \frac{1}{e^{x^2/8}}  \,\left(    \left(x^2-8\right)\,e^{x^2/8}  \right)  = &\\&   \yesnumber  = c_2\,e^{-x^2/8}+ x^2-8  = &\\& & \\ \shortintertext{\raggedright Using \eqref{eq:1.1-c_2}} &   = 4\,e^{-x^2/8} + x^2 - 8  %   %   % &\\[3ex]&   c_2 = c_0/c_1& \end{flalign*}% solving y(0) = -4\begin{flalign*}\label{eq:1.1-c_2}&& \\ \shortintertext{\raggedright Using \eqref{eq:1.1-y}} &   \yesnumber  y(0)  = c_2\,e^{-0^2/8}+ 0^2 - 8  = c_2 - 8  = - 4  \implies c_2 = 4&\end{flalign*}% φ(x)\begin{flalign} \label{eq:1.1-phi_x}&   \varphi(x)   = \exp{\left(    \int{\frac{1}{4}\,x\,\odif{x}}  \right)}  = \exp{\left(    \frac{1}{4} \left( \frac{x^2}{2} + c \right)  \right)}  = \exp{\left( \frac{c}{4} \right)}  \,\exp{\left(    \frac{x^2}{8}  \right)}  % \notag  % = &\\&  = c_1\,e^{ \frac{x^2}{8} }  ; &\\& \notag  c_1 = e^{c/4}& \end{flalign}% prim\begin{flalign*}\label{eq:1.1-prim}&   P\left(    \left(\frac{1}{4}\,x^3\right)\,\left(e^{x^2/8}\right)  \right)  =   P\left(    \left( x^2 \right)    \,\left(      e^{x^2/8}      \,\frac{x}{4}    \right)  \right)  =   P\left(    \left( x^2 \right) % u    \,\left( e^{x^2/8} \right)' % v'  \right)  = &\\&  =   % u\,v  x^2\,P\left(    \left( e^{x^2/8} \right)'  \right)  % P(v\,u')  - P\left(    P\left(      \odv{}{x}\left( e^{x^2/8} \right)    \right)    \,\odv{x^2}{x}  \right)  = &\\&  =   x^2\,e^{x^2/8}   - P\left(    e^{x^2/8}    \,2\,x  \right)  =   x^2\,e^{x^2/8}   - 8  \,P\left(    e^{x^2/8}    \,x/4  \right)  = &\\&  =   \left(x^2-8\right)  \,e^{x^2/8}   \yesnumber& \end{flalign*}\end{document}

pdf output


Viewing all articles
Browse latest Browse all 124

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>