home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: solve.tex
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text, with CR line terminators
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[CR]
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [ttxt] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 73 6f 6c 76 65 20 2d |\section|{solve -|
|00000010| 2d 2d 20 4c 69 6e 65 61 | 72 20 45 71 75 61 74 69 |-- Linea|r Equati|
|00000020| 6f 6e 20 53 6f 6c 75 74 | 69 6f 6e 7d 0d 5c 6c 61 |on Solut|ion}.\la|
|00000030| 62 65 6c 7b 66 6e 3a 73 | 6f 6c 76 65 7d 0d 5c 69 |bel{fn:s|olve}.\i|
|00000040| 6e 64 65 78 7b 73 6f 6c | 76 65 28 29 7d 0d 5c 69 |ndex{sol|ve()}.\i|
|00000050| 6e 64 65 78 7b 6c 69 6e | 65 61 72 20 65 71 75 61 |ndex{lin|ear equa|
|00000060| 74 69 6f 6e 20 73 6f 6c | 75 74 69 6f 6e 7d 0d 5c |tion sol|ution}.\|
|00000070| 69 6e 64 65 78 7b 73 6f | 6c 75 74 69 6f 6e 20 6f |index{so|lution o|
|00000080| 66 20 6c 69 6e 65 61 72 | 20 65 71 75 61 74 69 6f |f linear| equatio|
|00000090| 6e 73 7d 0d 5c 62 65 67 | 69 6e 7b 72 61 69 6c 7d |ns}.\beg|in{rail}|
|000000a0| 0d 53 6f 6c 76 65 20 3a | 20 27 73 6f 6c 76 65 27 |.Solve :| 'solve'|
|000000b0| 20 27 28 27 20 4d 61 74 | 72 69 78 20 27 2c 27 20 | '(' Mat|rix ',' |
|000000c0| 4d 61 74 72 69 78 20 27 | 29 27 20 3b 0d 5c 65 6e |Matrix '|)' ;.\en|
|000000d0| 64 7b 72 61 69 6c 7d 0d | 0d 5c 76 65 72 62 2b 73 |d{rail}.|.\verb+s|
|000000e0| 6f 6c 76 65 2b 20 69 73 | 20 61 20 66 75 6e 63 74 |olve+ is| a funct|
|000000f0| 69 6f 6e 20 74 6f 20 66 | 69 6e 64 20 74 68 65 20 |ion to f|ind the |
|00000100| 73 6f 6c 75 74 69 6f 6e | 20 74 6f 20 73 65 74 73 |solution| to sets|
|00000110| 20 6f 66 0d 6c 69 6e 65 | 61 72 20 65 71 75 61 74 | of.line|ar equat|
|00000120| 69 6f 6e 73 2e 20 49 66 | 20 74 68 65 20 6c 69 6e |ions. If| the lin|
|00000130| 65 61 72 20 65 71 75 61 | 74 69 6f 6e 20 69 73 20 |ear equa|tion is |
|00000140| 6f 66 20 74 68 65 20 66 | 6f 72 6d 3a 0d 0d 5c 5b |of the f|orm:..\[|
|00000150| 20 41 20 78 20 3d 20 42 | 20 5c 5d 0d 0d 74 68 65 | A x = B| \]..the|
|00000160| 6e 20 24 41 24 20 69 73 | 20 74 68 65 20 66 69 72 |n $A$ is| the fir|
|00000170| 73 74 20 61 72 67 75 6d | 65 6e 74 20 74 6f 20 73 |st argum|ent to s|
|00000180| 6f 6c 76 65 2c 20 61 6e | 64 20 69 73 20 74 68 65 |olve, an|d is the|
|00000190| 20 73 71 75 61 72 65 2c | 0d 6e 6f 6e 2d 73 69 6e | square,|.non-sin|
|000001a0| 67 75 6c 61 72 2c 20 63 | 6f 2d 65 66 66 69 63 69 |gular, c|o-effici|
|000001b0| 65 6e 74 73 20 6d 61 74 | 72 69 78 2e 20 20 45 61 |ents mat|rix. Ea|
|000001c0| 63 68 20 63 6f 6c 75 6d | 6e 20 69 6e 20 74 68 65 |ch colum|n in the|
|000001d0| 20 73 65 63 6f 6e 64 0d | 61 72 67 75 6d 65 6e 74 | second.|argument|
|000001e0| 20 69 73 20 75 73 65 64 | 20 69 6e 20 74 75 72 6e | is used| in turn|
|000001f0| 20 61 73 20 74 68 65 20 | 63 6f 6e 73 74 61 6e 74 | as the |constant|
|00000200| 20 70 61 72 74 2c 20 24 | 42 24 2c 20 61 6e 64 20 | part, $|B$, and |
|00000210| 74 68 65 20 65 61 63 68 | 0d 63 6f 6c 75 6d 6e 20 |the each|.column |
|00000220| 69 6e 20 74 68 65 20 72 | 65 73 75 6c 74 69 6e 67 |in the r|esulting|
|00000230| 20 6d 61 74 72 69 78 20 | 63 6f 72 72 65 73 70 6f | matrix |correspo|
|00000240| 6e 64 73 20 74 6f 20 75 | 73 69 6e 67 20 74 68 65 |nds to u|sing the|
|00000250| 20 73 61 6d 65 0d 63 6f | 6c 75 6d 6e 20 6f 66 20 | same.co|lumn of |
|00000260| 24 42 24 20 61 73 20 74 | 68 65 20 72 69 67 68 74 |$B$ as t|he right|
|00000270| 20 68 61 6e 64 20 73 69 | 64 65 2e 0d 0d 54 68 65 | hand si|de...The|
|00000280| 20 69 64 65 61 20 62 65 | 68 69 6e 64 20 74 68 69 | idea be|hind thi|
|00000290| 73 20 69 73 20 74 68 61 | 74 20 79 6f 75 20 6d 61 |s is tha|t you ma|
|000002a0| 79 20 68 61 76 65 20 61 | 20 73 65 76 65 72 61 6c |y have a| several|
|000002b0| 20 73 65 74 73 20 6f 66 | 20 6c 69 6e 65 61 72 0d | sets of| linear.|
|000002c0| 65 71 75 61 74 69 6f 6e | 73 20 75 73 69 6e 67 20 |equation|s using |
|000002d0| 74 68 65 20 73 61 6d 65 | 20 63 6f 2d 65 66 66 69 |the same| co-effi|
|000002e0| 63 69 65 6e 74 73 20 77 | 69 74 68 20 65 61 63 68 |cients w|ith each|
|000002f0| 20 76 61 72 69 61 62 6c | 65 2c 20 62 75 74 0d 65 | variabl|e, but.e|
|00000300| 71 75 61 74 65 64 20 74 | 6f 20 64 69 66 66 65 72 |quated t|o differ|
|00000310| 65 6e 74 20 63 6f 6e 73 | 74 61 6e 74 73 2e 20 20 |ent cons|tants. |
|00000320| 53 69 6e 63 65 20 6d 6f | 73 74 20 6f 66 20 74 68 |Since mo|st of th|
|00000330| 65 20 77 6f 72 6b 20 69 | 73 20 61 73 73 6f 63 69 |e work i|s associ|
|00000340| 61 74 65 64 0d 77 69 74 | 68 20 74 68 65 20 76 61 |ated.wit|h the va|
|00000350| 72 69 61 62 6c 65 20 63 | 6f 2d 65 66 66 69 63 69 |riable c|o-effici|
|00000360| 65 6e 74 73 2c 20 69 74 | 20 61 64 64 73 20 6c 69 |ents, it| adds li|
|00000370| 74 74 6c 65 20 6f 76 65 | 72 68 65 61 64 20 74 6f |ttle ove|rhead to|
|00000380| 20 73 6f 6c 76 65 20 66 | 6f 72 0d 73 65 76 65 72 | solve f|or.sever|
|00000390| 61 6c 20 73 65 74 73 20 | 6f 66 20 63 6f 6e 73 74 |al sets |of const|
|000003a0| 61 6e 74 73 2c 20 61 74 | 20 74 68 65 20 73 61 6d |ants, at| the sam|
|000003b0| 65 20 74 69 6d 65 2e 20 | 4e 6f 74 20 77 69 74 68 |e time. |Not with|
|000003c0| 73 74 61 6e 64 69 6e 67 | 20 74 68 69 73 2c 0d 6d |standing| this,.m|
|000003d0| 6f 73 74 20 6f 66 20 74 | 68 65 20 74 69 6d 65 20 |ost of t|he time |
|000003e0| 62 6f 74 68 20 74 68 65 | 20 73 65 63 6f 6e 64 20 |both the| second |
|000003f0| 61 72 67 75 6d 65 6e 74 | 20 61 6e 64 20 74 68 65 |argument| and the|
|00000400| 20 72 65 73 75 6c 74 20 | 77 69 6c 6c 20 62 65 0d | result |will be.|
|00000410| 63 6f 6c 75 6d 6e 20 76 | 65 63 74 6f 72 73 2c 20 |column v|ectors, |
|00000420| 72 65 70 72 65 73 65 6e | 74 69 6e 67 20 61 20 73 |represen|ting a s|
|00000430| 65 74 20 6f 66 20 73 69 | 6d 75 6c 74 61 6e 65 6f |et of si|multaneo|
|00000440| 75 73 20 73 6f 6c 75 74 | 69 6f 6e 73 2e 0d 0d 0d |us solut|ions....|
|00000450| 5c 70 61 72 61 67 72 61 | 70 68 7b 45 78 61 6d 70 |\paragra|ph{Examp|
|00000460| 6c 65 7d 0d 5c 69 6e 64 | 65 78 7b 65 78 61 6d 70 |le}.\ind|ex{examp|
|00000470| 6c 65 20 6f 66 20 73 6f | 6c 76 65 28 29 7d 0d 5c |le of so|lve()}.\|
|00000480| 69 6e 64 65 78 7b 73 6f | 6c 76 65 28 29 21 65 78 |index{so|lve()!ex|
|00000490| 61 6d 70 6c 65 7d 0d 5c | 62 65 67 69 6e 7b 76 65 |ample}.\|begin{ve|
|000004a0| 72 62 61 74 69 6d 7d 0d | 3e 20 41 20 3d 20 72 61 |rbatim}.|> A = ra|
|000004b0| 6e 64 28 35 2c 35 29 0d | 20 41 20 3d 0d 20 20 20 |nd(5,5).| A =. |
|000004c0| 30 2e 30 38 38 32 20 20 | 20 20 30 2e 30 30 35 34 |0.0882 | 0.0054|
|000004d0| 33 20 20 20 20 20 20 30 | 2e 32 34 36 20 20 20 20 |3 0|.246 |
|000004e0| 20 20 30 2e 31 36 31 20 | 20 20 20 20 20 30 2e 35 | 0.161 | 0.5|
|000004f0| 35 35 0d 20 20 20 20 30 | 2e 39 30 38 20 20 20 20 |55. 0|.908 |
|00000500| 20 20 30 2e 32 32 32 20 | 20 20 20 20 20 30 2e 37 | 0.222 | 0.7|
|00000510| 38 32 20 20 20 20 20 20 | 30 2e 39 37 35 20 20 20 |82 |0.975 |
|00000520| 20 20 20 20 30 2e 32 39 | 0d 20 20 20 20 30 2e 33 | 0.29|. 0.3|
|00000530| 36 32 20 20 20 20 20 20 | 20 30 2e 39 38 20 20 20 |62 | 0.98 |
|00000540| 20 20 20 30 2e 33 34 31 | 20 20 20 20 20 30 2e 30 | 0.341| 0.0|
|00000550| 31 30 36 20 20 20 20 20 | 20 30 2e 32 30 35 0d 20 |106 | 0.205. |
|00000560| 20 20 20 30 2e 31 34 38 | 20 20 20 20 20 20 20 30 | 0.148| 0|
|00000570| 2e 38 33 20 20 20 20 20 | 20 30 2e 34 36 31 20 20 |.83 | 0.461 |
|00000580| 20 20 20 20 30 2e 34 31 | 34 20 20 20 20 20 20 30 | 0.41|4 0|
|00000590| 2e 35 36 31 0d 20 20 20 | 20 30 2e 38 37 39 20 20 |.561. | 0.879 |
|000005a0| 20 20 30 2e 30 30 35 32 | 36 20 20 20 20 20 20 20 | 0.0052|6 |
|000005b0| 30 2e 35 32 20 20 20 20 | 20 20 30 2e 32 33 33 20 |0.52 | 0.233 |
|000005c0| 20 20 20 20 20 30 2e 37 | 39 31 0d 3e 20 58 20 3d | 0.7|91.> X =|
|000005d0| 20 72 61 6e 64 28 35 2c | 31 29 0d 20 58 20 3d 0d | rand(5,|1). X =.|
|000005e0| 20 20 20 20 30 2e 32 36 | 39 0d 20 20 20 20 30 2e | 0.26|9. 0.|
|000005f0| 33 33 34 0d 20 20 20 20 | 30 2e 32 37 38 0d 20 20 |334. |0.278. |
|00000600| 20 20 30 2e 37 38 39 0d | 20 20 20 20 30 2e 36 39 | 0.789.| 0.69|
|00000610| 32 0d 3e 20 42 20 3d 20 | 41 2a 58 0d 20 42 20 3d |2.> B = |A*X. B =|
|00000620| 0d 20 20 20 20 30 2e 36 | 30 35 0d 20 20 20 20 20 |. 0.6|05. |
|00000630| 31 2e 35 31 0d 20 20 20 | 20 20 30 2e 36 37 0d 20 |1.51. | 0.67. |
|00000640| 20 20 20 20 31 2e 31 36 | 0d 20 20 20 20 20 31 2e | 1.16|. 1.|
|00000650| 31 31 0d 3e 20 2f 2f 4e | 6f 77 20 77 65 20 73 68 |11.> //N|ow we sh|
|00000660| 6f 75 6c 64 20 62 65 20 | 61 62 6c 65 20 74 6f 20 |ould be |able to |
|00000670| 75 73 65 20 41 20 61 6e | 64 20 42 20 74 6f 20 67 |use A an|d B to g|
|00000680| 65 74 20 58 20 62 61 63 | 6b 0d 3e 20 73 6f 6c 6e |et X bac|k.> soln|
|00000690| 20 3d 20 73 6f 6c 76 65 | 28 41 2c 42 29 0d 20 73 | = solve|(A,B). s|
|000006a0| 6f 6c 6e 20 3d 0d 20 20 | 20 20 30 2e 32 36 39 0d |oln =. | 0.269.|
|000006b0| 20 20 20 20 30 2e 33 33 | 34 0d 20 20 20 20 30 2e | 0.33|4. 0.|
|000006c0| 32 37 38 0d 20 20 20 20 | 30 2e 37 38 39 0d 20 20 |278. |0.789. |
|000006d0| 20 20 30 2e 36 39 32 0d | 3e 20 2f 2f 20 43 68 65 | 0.692.|> // Che|
|000006e0| 63 6b 20 68 6f 77 20 63 | 6c 6f 73 65 20 77 65 20 |ck how c|lose we |
|000006f0| 61 72 65 3a 0d 3e 20 73 | 6f 6c 6e 20 2d 20 58 0d |are:.> s|oln - X.|
|00000700| 2d 32 2e 32 32 65 2d 31 | 36 0d 2d 31 2e 36 37 65 |-2.22e-1|6.-1.67e|
|00000710| 2d 31 36 0d 20 38 2e 38 | 38 65 2d 31 36 0d 2d 34 |-16. 8.8|8e-16.-4|
|00000720| 2e 34 34 65 2d 31 36 0d | 2d 32 2e 32 32 65 2d 31 |.44e-16.|-2.22e-1|
|00000730| 36 0d 5c 65 6e 64 7b 76 | 65 72 62 61 74 69 6d 7d |6.\end{v|erbatim}|
|00000740| 0d 0d 53 65 65 20 61 6c | 73 6f 3a 20 50 61 67 65 |..See al|so: Page|
|00000750| 7e 5c 70 61 67 65 72 65 | 66 7b 66 6e 3a 62 61 63 |~\pagere|f{fn:bac|
|00000760| 6b 73 75 62 7d 20 5c 76 | 65 72 62 2b 62 61 63 6b |ksub} \v|erb+back|
|00000770| 73 75 62 28 29 2b 2c 0d | 50 61 67 65 7e 5c 70 61 |sub()+,.|Page~\pa|
|00000780| 67 65 72 65 66 7b 66 6e | 3a 66 61 63 74 6f 72 7d |geref{fn|:factor}|
|00000790| 20 5c 76 65 72 62 2b 66 | 61 63 74 6f 72 28 29 2b | \verb+f|actor()+|
|000007a0| 2c 0d 50 61 67 65 7e 5c | 70 61 67 65 72 65 66 7b |,.Page~\|pageref{|
|000007b0| 66 6e 3a 69 6e 76 7d 20 | 5c 76 65 72 62 2b 69 6e |fn:inv} |\verb+in|
|000007c0| 76 28 29 2b 2e 0d 0d 0d | 5c 6e 65 77 70 61 67 65 |v()+....|\newpage|
|000007d0| 0d 0d 0d 0d | |.... | |
+--------+-------------------------+-------------------------+--------+--------+