Debian Codegraph @

texmf-dist/doc/latex/exsol/example-external.tex

raw
1 %%
2 %% This is file `example-external.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% exsol.dtx (with options: `example-external')
8 %%
9 %% This is a generated file.
10 %%
11 %% Copyright (C) 2019 by Walter Daems <[email protected]>
12 %%
13 %% This file may be distributed and/or modified under the conditions of
14 %% the LaTeX Project Public License, either version 1.3 of this license
15 %% or (at your option) any later version. The latest version of this
16 %% license is in:
17 %%
18 %% http://www.latex-project.org/lppl.txt
19 %%
20 %% and version 1.3 or later is part of all distributions of LaTeX version
21 %% 2005/12/01 or later.
22 %%
23 \documentclass[a4paper,10pt]{article}
24
25 \usepackage{a4wide}
26 \usepackage[english]{babel}
27 \usepackage[external]{exsol}
28
29 \title{External example, from the \textsf{ExSol} package}
30 \author{Walter Daems}
31 \setlength{\parindent}{0em}
32 \begin{document}
33 \maketitle
34
35 \section{Introduction}
36
37 In this text we explain how to solve second-order polynomial
38 equations.
39
40 \section{Solving second-order polynomial equations}
41
42 \begin{informulacollectiononly}
43 \section*{Solving second-order polynomial equations}
44 \end{informulacollectiononly}
45 \begin{informulacollection}
46 The roots of the following equation
47 \begin{equation}
48 a x^2 + bx + c = 0
49 \end{equation}
50 can be determined as:
51 \begin{equation}
52 x_{1,2} = \frac{-b \pm \sqrt{b^2 - 4 a c}}{2 a}
53 \end{equation}
54 \end{informulacollection}
55
56 \begin{exercises}[columns = 2]
57
58 \begin{exercise}
59 Solve the following equation for $x \in C$, with $C$ the set of
60 complex numbers:
61 \begin{equation}
62 5 x^2 -3 x = 5
63 \end{equation}
64 \end{exercise}
65 \begin{solution}
66 Let's start by rearranging the equation, a bit:
67 \begin{eqnarray}
68 5.7 x^2 - 3.1 x &=& 5.3\\
69 5.7 x^2 - 3.1 x -5.3 &=& 0
70 \end{eqnarray}
71 The equation is now in the standard form:
72 \begin{equation}
73 a x^2 + b x + c = 0
74 \end{equation}
75 For quadratic equations in the standard form, we know that two
76 solutions exist:
77 \begin{equation}
78 x_{1,2} = \frac{ -b \pm \sqrt{d}}{2a}
79 \end{equation}
80 with
81 \begin{equation}
82 d = b^2 - 4 a c
83 \end{equation}
84 If we apply this to our case, we obtain:
85 \begin{equation}
86 d = (-3.1)^2 - 4 \cdot 5.7 \cdot (-5.3) = 130.45
87 \end{equation}
88 and
89 \begin{eqnarray}
90 x_1 &=& \frac{3.1 + \sqrt{130.45}}{11.4} = 1.27\\
91 x_2 &=& \frac{3.1 - \sqrt{130.45}}{11.4} = -0.73
92 \end{eqnarray}
93 The proposed values $x = x_1, x_2$ are solutions to the given equation.
94 \end{solution}
95 \begin{exercise}
96 Consider a 2-dimensional vector space equipped with a Euclidean
97 distance function. Given a right-angled triangle, with the sides
98 $A$ and $B$ adjacent to the right angle having lengths, $3$ and
99 $4$, calculate the length of the hypotenuse, labeled $C$.
100 \end{exercise}
101 \begin{solution}
102 This calls for application of Pythagoras' theorem, which
103 tells us:
104 \begin{equation}
105 \left\|A\right\|^2 + \left\|B\right\|^2 = \left\|C\right\|^2
106 \end{equation}
107 and therefore:
108 \begin{eqnarray}
109 \left\|C\right\|
110 &=& \sqrt{\left\|A\right\|^2 + \left\|B\right\|^2}\\
111 &=& \sqrt{3^2 + 4^2}\\
112 &=& \sqrt{25} = 5
113 \end{eqnarray}
114 Therefore, the length of the hypotenuse equals $5$.
115 \end{solution}
116 \end{exercises}
117 And now, we can come to conclusion.
118
119 \section{Conclusion}
120 Solving second-order polynomial equations is very easy.
121 \end{document}
122 \endinput
123 %%
124 %% End of file `example-external.tex'.