56 | Math-ML: Proving the Pythagorean theorem
57 | We will now prove the Pythogorian theorem:
58 |
59 | Statement: In a right angled triangle, the square of the hypotenuse is equal to the sum of the
60 | squares of the other two sides.
61 |
62 | i.e, If a and b are the legs and c is the hypotenuse then
63 |
64 |
65 | a
66 | 2
67 |
68 | +
69 |
70 | b
71 | 2
72 |
73 | =
74 |
75 | c
76 | 2
77 |
78 |
79 | .
80 | Proof: We can prove the theorem algebraically by showing that the area of the big square
81 | equals the area of the inner square (hypotenuse squared) plus the area of the four triangles:
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 | (
90 | a
91 | +
92 | b
93 | )
94 |
95 | 2
96 |
97 |
98 |
99 | =
100 |
101 |
102 |
103 | c
104 | 2
105 |
106 | +
107 | 4
108 | ⋅
109 | (
110 |
111 | 1
112 | 2
113 |
114 | a
115 | b
116 | )
117 |
118 |
119 |
120 |
121 |
122 | a
123 | 2
124 |
125 | +
126 | 2
127 | a
128 | b
129 | +
130 |
131 | b
132 | 2
133 |
134 |
135 |
136 | =
137 |
138 |
139 |
140 | c
141 | 2
142 |
143 | +
144 | 2
145 | a
146 | b
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 | a
156 | 2
157 |
158 | +
159 |
160 | b
161 | 2
162 |
163 |
164 |
165 | =
166 |
167 |
168 |
169 | c
170 | 2
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
--------------------------------------------------------------------------------
/dist/mo.js:
--------------------------------------------------------------------------------
1 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5 | return c > 3 && r && Object.defineProperty(target, key, r), r;
6 | };
7 | var __metadata = (this && this.__metadata) || function (k, v) {
8 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9 | };
10 | import { MathMLElement, html, customElement, property } from './mathml-element.js';
11 | let MathOElement = class MathOElement extends MathMLElement {
12 | constructor() {
13 | super(...arguments);
14 | this.formStyle = '';
15 | }
16 | render() {
17 | return html `
18 |
67 |