不知道为什么这个 latex 代码输出的是乱码。有人能帮我修复一下吗?

不知道为什么这个 latex 代码输出的是乱码。有人能帮我修复一下吗?

很难找到为什么输出不正确的原因。

 $
\text{ Let there be a right triangle with angle A (not with measurement 90 deg) } \\ 
\text{  whose adjacent has measurement }  3 \text{ and whose opposite has measurement } 2 \\ 
\text{ therefore the  hypotenuse of the triangle has measurement } \sqrt{13} \\
\text{ so this means } \sin(A)=\frac{2}{\sqrt{13}} \text{ and } \cos(A)=\frac{3}{\sqrt{13}}  \\
3 \sin(x)+2 \cos(x)=\sqrt{13}(\frac{3}{\sqrt{13}} \sin(x)+\frac{2}{\sqrt{13}} \cos(x)) \\ 
=\sqrt{13}(\cos(A) \sin(x)+\sin(A) \cos(x)) =\sqrt{13} \sin(x+A) \\
  2 \sin(x)+3 \cos(x)  = \sqrt{13}(\frac{2}{\sqrt{13}} \sin(x)+\frac{3}{\sqrt{13}} \cos(x))  \\ 
=\sqrt{13}(\sin(A) \sin(x)+\cos(A) \cos(x)) =\sqrt{13} \cos(x-A) \\  
\text{… } \\
\int \frac{ 3 \sin(x)+2 \cos(x)}{  2 \sin(x)+3 \cos(x)   } dx= \int \frac{\sqrt{13} \sin(x+A)   }{\sqrt{13} \cos(x-A)   } dx \\
=\int \frac{ \sin(x-A+2A)} {\cos(x-A)} dx=\int \frac{ \sin(x-A) \cos(2A)+ \sin(2A) \cos(x-A)}{\cos(x-A)} dx \\ =\cos(2A) \int \frac{ \sin(x-A)}{\cos(x-A)} dx+ \sin(2A) \int \frac{\cos(x-A)}{\cos(x-A)} dx\\ 
=(\cos^2(A)-\sin^2(A)) \int \frac{\sin(x-A)}{\cos(x-A)} dx+2 \sin(A) \cos(A) \int 1 dx \\ 
=((\frac{3}{\sqrt{13}})^2-(\frac{2}{\sqrt{13}})^2) \int \frac{-du}{u} +2 \frac{2}{\sqrt{13}}  \frac{3}{\sqrt{13}} x +C \\ 
\text{ (note: where } u=\cos(x-A) \text{ and so } du=-\sin(x-A) dx \text{ ) } \\
=(\frac{9}{13}-\frac{4}{13}) (- \ln|u|)+\frac{12}{13} x+C \\ 
=- \frac{5}{13} \ln|\cos(x-A)| +\frac{12}{13}x+C \\ 
=-\frac{5}{13} \ln|\cos(x) \cos(A)+\sin(x) \sin(A)|+\frac{12}{13}x+C \\
=-\frac{5}{13} \ln|\cos(x) \frac{3}{\sqrt{13}}+ \sin(x) \frac{2}{\sqrt{13}}|+\frac{12}{13}x+C \\ 
=-\frac{5}{13} \ln| \frac{1}{\sqrt{13}} (3 \cos(x)+2  \sin(x))| +\frac{12}{13}x+C \\ 
=-\frac{5}{13} \ln|\frac{1}{\sqrt{13}}|-\frac{5}{13} \ln|3 \cos(x)+2 \sin(x)|+\frac{12}{13}x+C \\ 
=-\frac{5}{13} \ln|3 \cos(x)+2 \sin(x)|+\frac{12}{13}x-\frac{5}{13} \ln|\frac{1}{\sqrt{13}}|+C \\ 
=-\frac{5}{13} \ln|3 \cos(x)+2 \sin(x)|+\frac{12}{13}x+K \\ 
$

答案1

这仍然有点太宽了,但是

在此处输入图片描述

\documentclass{article}

\usepackage{amsmath}

\begin{document}

Let there be a right triangle with angle $A$ (not with measurement 90 deg)
whose adjacent has measurement  3  and whose opposite has measurement 2 
therefore the  hypotenuse of the triangle has measurement $\sqrt{13}$
so this means
\[
\sin(A)=\frac{2}{\sqrt{13}} \text{ and } \cos(A)=\frac{3}{\sqrt{13}}
\]
Then
\begin{align*}
3 \sin(x)+2 \cos(x)&=\sqrt{13}(\frac{3}{\sqrt{13}} \sin(x)+\frac{2}{\sqrt{13}} \cos(x)) \\ 
&=\sqrt{13}(\cos(A) \sin(x)+\sin(A) \cos(x))\\
& =\sqrt{13} \sin(x+A)
\end{align*}
???
\begin{align*}
  2 \sin(x)+3 \cos(x)  &= \sqrt{13}(\frac{2}{\sqrt{13}} \sin(x)+\frac{3}{\sqrt{13}} \cos(x))  \\ 
&=\sqrt{13}(\sin(A) \sin(x)+\cos(A) \cos(x))\\
& =\sqrt{13} \cos(x-A) \\  
\ldots
\end{align*}
???
\begin{align*}
\int \frac{ 3 \sin(x)+2 \cos(x)}{  2 \sin(x)+3 \cos(x)   } dx&= \int \frac{\sqrt{13} \sin(x+A)   }{\sqrt{13} \cos(x-A)   } dx \\
&=\int \frac{ \sin(x-A+2A)} {\cos(x-A)} dx\\
&=\int \frac{ \sin(x-A) \cos(2A)+ \sin(2A) \cos(x-A)}{\cos(x-A)} dx \\ 
&=\cos(2A) \int \frac{ \sin(x-A)}{\cos(x-A)} dx+ \sin(2A) \int \frac{\cos(x-A)}{\cos(x-A)} dx\\ 
&=(\cos^2(A)-\sin^2(A)) \int \frac{\sin(x-A)}{\cos(x-A)} dx+2 \sin(A) \cos(A) \int 1 dx \\ 
&=((\frac{3}{\sqrt{13}})^2-(\frac{2}{\sqrt{13}})^2) \int \frac{-du}{u} +2 \frac{2}{\sqrt{13}}  \frac{3}{\sqrt{13}} x +C
\intertext{
(note: where  $u=\cos(x-A)$  and so  $du=-\sin(x-A) dx$
}
&=(\frac{9}{13}-\frac{4}{13}) (- \ln|u|)+\frac{12}{13} x+C \\ 
&=- \frac{5}{13} \ln|\cos(x-A)| +\frac{12}{13}x+C \\ 
&=-\frac{5}{13} \ln|\cos(x) \cos(A)+\sin(x) \sin(A)|+\frac{12}{13}x+C \\
&=-\frac{5}{13} \ln|\cos(x) \frac{3}{\sqrt{13}}+ \sin(x) \frac{2}{\sqrt{13}}|+\frac{12}{13}x+C \\ 
&=-\frac{5}{13} \ln| \frac{1}{\sqrt{13}} (3 \cos(x)+2  \sin(x))| +\frac{12}{13}x+C \\ 
&=-\frac{5}{13} \ln|\frac{1}{\sqrt{13}}|-\frac{5}{13} \ln|3 \cos(x)+2 \sin(x)|+\frac{12}{13}x+C \\ 
&=-\frac{5}{13} \ln|3 \cos(x)+2 \sin(x)|+\frac{12}{13}x-\frac{5}{13} \ln|\frac{1}{\sqrt{13}}|+C \\ 
&=-\frac{5}{13} \ln|3 \cos(x)+2 \sin(x)|+\frac{12}{13}x+K 
\end{align*}

\end{document}

答案2

这里有一些更简洁的内容。我使用该nccmath包获取中等大小(数字)分数,并mathtools定义\abs具有正确间距和可变大小的命令(绝对值)。最后,我\d为微分定义了一个命令,具有正确的间距和直立的 d:

   \documentclass[11pt,a4paper]{article}
    \usepackage[utf8]{inputenc}
    \usepackage{mathtools, nccmath}
    \DeclarePairedDelimiter\abs{\lvert}{\rvert}
    \AtBeginDocument{\renewcommand*{\d}{\mathop{\kern0pt\mathrm{d}}\!{}}}%
    \usepackage{siunitx}

    \begin{document}


     Let there be a right triangle with angle $ A $ (not with measurement \SI{90}{\deg } whose adjacent has measurement $ 3 $ and whose opposite has measurement $ 2 $, therefore the hypotenuse of the triangle has measurement $ \sqrt{13} $. So this means:
     \begin{align*}
    & \sin A =\mfrac{2}{\sqrt{13}} \text{ and } \cos A =\mfrac{3}{\sqrt{13}} \\
    3 \sin x +2 \cos x & =\sqrt{13}\Bigl(\mfrac{3}{\sqrt{13}} \sin x +\mfrac{2}{\sqrt{13}} \cos x \Bigr) \\
     & =\sqrt{13}\bigl(\cos A \sin x +\sin A \cos x \bigr) =\sqrt{13} \sin(x+A) \\
      2 \sin x +3 \cos x & = \sqrt{13}\Bigl(\mfrac{2}{\sqrt{13}} \sin x +\mfrac{3}{\sqrt{13}} \cos x\Bigr) \\
     & =\sqrt{13}(\sin A \sin x +\cos A \cos x ) =\sqrt{13} \cos(x-A) \\
    \shortintertext{… }
    \MoveEqLeft[8]\mathrlap{\int \frac{ 3 \sin x +2 \cos x }{2 \sin x +3 \cos x} \d x = \int \frac{\sqrt{13}\sin(x+A)} {\sqrt{13} \cos(x-A)} \d x =\int \frac{\sin(x-A+2A)} {\cos(x-A)} \d x}\\
     & =\int \frac{\sin(x-A) \cos 2A + \sin 2A \cos(x-A)}{\cos(x-A)} \d x \\
     & =\cos 2A \int \frac{\sin(x-A)}{\cos(x-A)} \d x+ \sin 2A \int \frac{\cos(x-A)}{\cos(x-A)} \d x\\
     & =(\cos^2 A -\sin^2 A ) \int \frac{\sin(x-A)}{\cos(x-A)} \d x+2 \sin A \cos A \int 1 \d x \\
     & =\Bigl(\Bigl(\mfrac{3}{\sqrt{13}}\Bigr)^2-\Bigl(\mfrac{2}{\sqrt{13}}\Bigr)^2\Bigr) \int \frac{-du}{u} +2 \mfrac{2}{\sqrt{13}} \mfrac{3}{\sqrt{13}} x +C \\
    \intertext{(note: where $ u=\cos(x-A) $ and so $ du =-\sin(x-A) \d x $) }
     & =\Bigl(\mfrac{9}{13}-\mfrac{4}{13}\Bigr) (- \ln\abs{u})+\mfrac{12}{13} x+C \\
     & =- \mfrac{5}{13} \ln\abs{\cos(x-A)} +\mfrac{12}{13}x+C \\
     & =-\mfrac{5}{13} \ln\abs{\cos x \cos A +\sin x \sin A } +\mfrac{12}{13}x+C \\
     & =-\mfrac{5}{13} \ln\abs[\Big]{\cos x \mfrac{3}{\sqrt{13}}+ \sin x \mfrac{2}{\sqrt{13}}} +\mfrac{12}{13}x+C \\
     & =-\mfrac{5}{13} \ln\abs[\Big]{ \mfrac{1}{\sqrt{13}} (3 \cos x +2 \sin x )} +\mfrac{12}{13}x+C \\
     & =-\mfrac{5}{13} \ln\abs[\Big]{\mfrac{1}{\sqrt{13}}} -\mfrac{5}{13} \ln\abs{3 \cos x +2 \sin x } +\mfrac{12}{13}x+C \\
     & =-\mfrac{5}{13} \ln\abs{3 \cos x +2 \sin x } +\mfrac{12}{13}x-\mfrac{5}{13} \ln\abs{\mfrac{1}{\sqrt{13}}} +C \\
     & =-\mfrac{5}{13} \ln\abs{3 \cos x +2 \sin x } +\mfrac{12}{13}x+K
    \end{align*}

\end{document}

在此处输入图片描述

相关内容