home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Mathematics / Notebooks / SRQA.ma < prev   
Text File  |  1992-08-18  |  53KB  |  1,611 lines

  1. (*^
  2.  
  3. ::[    frontEndVersion = "NeXT Mathematica Notebook Front End Version 2.1";
  4.     next21StandardFontEncoding; 
  5.     paletteColors = 128; showRuler; automaticGrouping; currentKernel; 
  6.     fontset = title, inactive, noPageBreakBelow, noPageBreakInGroup, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L1, e8,  24, "Times"; ;
  7.     fontset = subtitle, inactive, noPageBreakBelow, noPageBreakInGroup, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L1, e6,  18, "Times"; ;
  8.     fontset = subsubtitle, inactive, noPageBreakBelow, noPageBreakInGroup, nohscroll, preserveAspect, groupLikeTitle, center, M7, italic, L1, e6,  14, "Times"; ;
  9.     fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, L1, a20,  18, "Times"; ;
  10.     fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, L1, a15,  14, "Times"; ;
  11.     fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, L1, a12,  12, "Times"; ;
  12.     fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  13.     fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  10, "Times"; ;
  14.     fontset = input, noPageBreakBelow, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L1,  12, "Courier"; ;
  15.     fontset = output, output, inactive, noPageBreakBelow, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5,  12, "Courier"; ;
  16.     fontset = message, inactive, noPageBreakBelow, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1,  12, "Courier"; ;
  17.     fontset = print, inactive, noPageBreakBelow, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1,  12, "Courier"; ;
  18.     fontset = info, inactive, noPageBreakBelow, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1,  12, "Courier"; ;
  19.     fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakBelow, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, L1,  12, "Courier"; ;
  20.     fontset = name, inactive, noPageBreakInGroup, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, B65535, L1,  10, "Times"; ;
  21.     fontset = header, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  22.     fontset = Left Header, inactive, nohscroll, noKeepOnOnePage, preserveAspect, cellOutline, M7, L1,  12;
  23.     fontset = footer, inactive, nohscroll, noKeepOnOnePage, preserveAspect, center, M7, L1,  12;
  24.     fontset = Left Footer, inactive, nohscroll, noKeepOnOnePage, preserveAspect, cellOutline, center, blackBox, M7, L1,  12;
  25.     fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  10, "Times"; ;
  26.     fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  27.     fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12, "Courier"; ;
  28.     fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  29.     fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  30.     fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  31.     fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  32.     fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  33. ]
  34. :[font = title; inactive; preserveAspect; startGroup; ]
  35. Software Reliability
  36. Quality Assurance
  37. and Mathematica
  38. :[font = subsubtitle; inactive; preserveAspect; ]
  39. by
  40. :[font = subtitle; inactive; preserveAspect; startGroup; ]
  41. Michael J. Mezzino, Jr.
  42. University of Houston - Clear Lake
  43. (mezzino@gauss.cl.uh.edu)
  44.  
  45. :[font = section; inactive; pageBreak; preserveAspect; startGroup; ]
  46. Introduction
  47. :[font = text; inactive; preserveAspect; endGroup; ]
  48. Although Mathematica has many fundamentally important uses, I want to demonstrate one of the more versatile features of the complete system -  using Mathematica as a C.A.S.E. development tool. To do this, I will use a classical principal from physics.
  49. :[font = section; inactive; preserveAspect; startGroup; ]
  50. Background in Physics
  51. :[font = text; inactive; preserveAspect; ]
  52. Suppose that we start with Newton's second law of motion, which states that the acceleration "a" of an object is proportional to the force "F" exerted on it. This law is usually expressed in equation form as
  53. :[font = input; closed; preserveAspect; groupLikeNormal; ]
  54. TeXDisplay["(F=m a)//HoldForm"]
  55. :[font = postscript; PostScript; formatAsPostScript; output; inactive; preserveAspect; pictureLeft = 154; pictureTop = 6; pictureWidth = 125; pictureHeight = 32; ]
  56. %!
  57. %%Creator: Mathematica
  58. %%AspectRatio: 0.25623 
  59. MathPictureStart
  60. /Courier findfont 10  scalefont  setfont
  61. % Scaling calculations
  62. 0.02381 0.952381 0.006101 0.244025 [
  63. [ 0 0 0 0 ]
  64. [ 1 0.256226 0 0 ]
  65. ] MathScale
  66. % Start of Graphics
  67. 1 setlinecap
  68. 1 setlinejoin
  69. newpath
  70. %%Object: Graphics
  71. [ ] 0 setdash
  72. 0 setgray
  73. gsave
  74. grestore
  75. 0 0 moveto
  76. 1 0 lineto
  77. 1 0.25623 lineto
  78. 0 0.25623 lineto
  79. closepath
  80. clip
  81. newpath
  82. % Start of user PostScript
  83. %!PS-Adobe-2.0
  84. %%Creator: dvips, version 5.396 (C) 1986-90 Radical Eye Software
  85. %%Title: .TTMFILE.dvi
  86. %%Pages: 1 1
  87. 0.023591 0.023591 scale
  88. -72.000000 -708.200012 translate
  89. %%BoundingBox: 0 0 612 792
  90. %%EndComments
  91. %%BeginProcSet: tex.pro
  92. /TeXDict 200 dict def TeXDict begin /N /def load def /B{bind def}N /S /exch
  93. load def /X{S N}B /TR /translate load N /isls false N /vsize 10 N /@rigin{
  94. isls{[0 1 -1 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale
  95. Resolution VResolution vsize neg mul TR}B /@letter{/vsize 10 N}B /@landscape{
  96. /isls true N /vsize -1 N}B /@a4{/vsize 10.6929133858 N}B /@legal{/vsize 13 N}
  97. B /@manualfeed{statusdict /manualfeed true put}B /@copies{/#copies X}B /FMat[
  98. 1 0 0 -1 0 0]N /FBB[0 0 0 0]N /df{/sf 1 N /fntrx FMat N df-tail}B /dfs{div /sf
  99. X /fntrx[sf 0 0 sf neg 0 0]N df-tail}B /df-tail{/nn 8 dict N nn begin
  100. /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N string /base X array
  101. /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N end dup{/foo setfont}2
  102. array copy cvx N load 0 nn put /ctr 0 N[}B /E{pop nn dup definefont setfont}B
  103. /ch-image{ch-data dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B
  104. /ch-width{ch-data dup length 5 sub get}B /ch-height{ch-data dup length 4 sub
  105. get}B /ch-xoff{128 ch-data dup length 3 sub get sub}B /ch-yoff{ch-data dup
  106. length 2 sub get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B /ctr 0 N
  107. /CharBuilder{save 3 1 roll S dup /base get 2 index get S /BitMaps get S get
  108. /ch-data X pop /ctr 0 N ch-dx 0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width
  109. add ch-yoff setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub
  110. ch-yoff .1 add]{ch-image}imagemask restore}B /D{/cc X dup type /stringtype ne{
  111. ]}if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup length 1
  112. sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{cc 1 add D}B
  113. /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin 0 0 moveto}B /eop{
  114. clear SI restore showpage userdict /eop-hook known{eop-hook}if}B /@start{
  115. userdict /start-hook known{start-hook}if /VResolution X /Resolution X 1000 div
  116. /DVImag X /IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for}
  117. B /p /show load N /RMat[1 0 0 -1 0 0]N /BDot 8 string N /v{/ruley X /rulex X V
  118. }B /V{gsave TR -.1 -.1 TR rulex ruley scale 1 1 false RMat{BDot}imagemask
  119. grestore}B /a{moveto}B /delta 0 N /tail{dup /delta X 0 rmoveto}B /M{S p delta
  120. add tail}B /b{S p tail}B /c{-4 M}B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{
  121. 1 M}B /i{2 M}B /j{3 M}B /k{4 M}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p -1 w
  122. }B /q{p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /w{0 rmoveto}B /x{0 S rmoveto}
  123. B /y{3 2 roll p a}B /bos{/SS save N}B /eos{clear SS restore}B end
  124. %%EndProcSet
  125. TeXDict begin 1000 400 400 @start /Fa 1 62 df<7FFFFFFFFF00FFFFFFFFFF80FFFFFFFF
  126. FF80FFFFFFFFFF8000000000000000000000000000000000000000000000000000000000000000
  127. 0000000000000000000000000000000000000000000000000000000000FFFFFFFFFF80FFFFFFFF
  128. FF80FFFFFFFFFF807FFFFFFFFF0029127C9632>61 D E /Fb 3 110 df<003FFFFFFF80007FFF
  129. FFFF80003FFFFFFF800001FE003F800003FC000F800003FC0007800003FC0007800003FC000780
  130. 0007F80007800007F80007800007F80007000007F80C0700000FF01C0700000FF01C0300000FF0
  131. 1C0000000FF03C0000001FE0780000001FFFF80000001FFFF80000001FFFF80000003FC0F00000
  132. 003FC0700000003FC0700000003FC0700000007F80E00000007F80600000007F80000000007F80
  133. 00000000FF0000000000FF0000000000FF0000000000FF0000000001FE0000000001FE00000000
  134. 01FE000000007FFFF8000000FFFFFC0000007FFFF800000029267EA526>70
  135. D<001F8000007FE70001F87F8003E03F8007C01F800F801F801F801F803F803F003F003F007F00
  136. 3F007F003F00FE007E00FE007E00FE007E00FE007E00FC00FC00FC00FC38FC00FC38FC00FC38FC
  137. 01F8707C01F8707C03F8603E0E7CE00FFC3FC003F01F001D197D9823>97
  138. D<07C01FC00FE0000FF07FF03FF80018F8E0F8707C0038FB80FDC07E0070FF007F803E0070FE00
  139. 7F003E0070FC007E003E00E1FC00FE007E00E1F800FC007E0001F800FC007E0001F800FC007E00
  140. 03F001F800FC0003F001F800FC0003F001F800FC0003F001F801F80007E003F001F80007E003F0
  141. 01F87007E003F003F07007E003F003F0600FC007E007E0E00FC007E007E0C00FC007E003E1C00F
  142. C007E003E3800F8007C001FF0007000380007C0034197E9839>109 D E
  143. end
  144. %%EndProlog
  145. %%BeginSetup
  146. %%Feature: *Resolution 400
  147. TeXDict begin @letter
  148. %%EndSetup
  149. %%Page: 1 1
  150. bop 0 55 a Fb(F)27 b Fa(=)17 b Fb(m)11 b(a)p eop
  151. %%Trailer
  152. end
  153. userdict /end-hook known{end-hook}if
  154. %%EOF
  155.  
  156. % End of user PostScript
  157. % End of Graphics
  158. MathPictureEnd
  159. :[font = text; inactive; preserveAspect; ]
  160. where "m", the rest mass of the object, is the constant of proportionality. In terms of scalar functions of time "t", we may write
  161. :[font = input; closed; preserveAspect; startGroup; ]
  162. TeXDisplay["(F[t]=m x''[t])//HoldForm"]
  163. :[font = postscript; PostScript; formatAsPostScript; output; inactive; preserveAspect; pictureLeft = 107; pictureWidth = 240; pictureHeight = 41; endGroup; ]
  164. %!
  165. %%Creator: Mathematica
  166. %%AspectRatio: 0.17239 
  167. MathPictureStart
  168. /Courier findfont 10  scalefont  setfont
  169. % Scaling calculations
  170. 0.02381 0.952381 0.004104 0.164178 [
  171. [ 0 0 0 0 ]
  172. [ 1 0.172386 0 0 ]
  173. ] MathScale
  174. % Start of Graphics
  175. 1 setlinecap
  176. 1 setlinejoin
  177. newpath
  178. %%Object: Graphics
  179. [ ] 0 setdash
  180. 0 setgray
  181. gsave
  182. grestore
  183. 0 0 moveto
  184. 1 0 lineto
  185. 1 0.17239 lineto
  186. 0 0.17239 lineto
  187. closepath
  188. clip
  189. newpath
  190. % Start of user PostScript
  191. %!PS-Adobe-2.0
  192. %%Creator: dvips, version 5.396 (C) 1986-90 Radical Eye Software
  193. %%Title: .TTMFILE.dvi
  194. %%Pages: 1 1
  195. 0.011874 0.011874 scale
  196. -72.000000 -705.700012 translate
  197. %%BoundingBox: 0 0 612 792
  198. %%EndComments
  199. %%BeginProcSet: tex.pro
  200. /TeXDict 200 dict def TeXDict begin /N /def load def /B{bind def}N /S /exch
  201. load def /X{S N}B /TR /translate load N /isls false N /vsize 10 N /@rigin{
  202. isls{[0 1 -1 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale
  203. Resolution VResolution vsize neg mul TR}B /@letter{/vsize 10 N}B /@landscape{
  204. /isls true N /vsize -1 N}B /@a4{/vsize 10.6929133858 N}B /@legal{/vsize 13 N}
  205. B /@manualfeed{statusdict /manualfeed true put}B /@copies{/#copies X}B /FMat[
  206. 1 0 0 -1 0 0]N /FBB[0 0 0 0]N /df{/sf 1 N /fntrx FMat N df-tail}B /dfs{div /sf
  207. X /fntrx[sf 0 0 sf neg 0 0]N df-tail}B /df-tail{/nn 8 dict N nn begin
  208. /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N string /base X array
  209. /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N end dup{/foo setfont}2
  210. array copy cvx N load 0 nn put /ctr 0 N[}B /E{pop nn dup definefont setfont}B
  211. /ch-image{ch-data dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B
  212. /ch-width{ch-data dup length 5 sub get}B /ch-height{ch-data dup length 4 sub
  213. get}B /ch-xoff{128 ch-data dup length 3 sub get sub}B /ch-yoff{ch-data dup
  214. length 2 sub get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B /ctr 0 N
  215. /CharBuilder{save 3 1 roll S dup /base get 2 index get S /BitMaps get S get
  216. /ch-data X pop /ctr 0 N ch-dx 0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width
  217. add ch-yoff setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub
  218. ch-yoff .1 add]{ch-image}imagemask restore}B /D{/cc X dup type /stringtype ne{
  219. ]}if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup length 1
  220. sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{cc 1 add D}B
  221. /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin 0 0 moveto}B /eop{
  222. clear SI restore showpage userdict /eop-hook known{eop-hook}if}B /@start{
  223. userdict /start-hook known{start-hook}if /VResolution X /Resolution X 1000 div
  224. /DVImag X /IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for}
  225. B /p /show load N /RMat[1 0 0 -1 0 0]N /BDot 8 string N /v{/ruley X /rulex X V
  226. }B /V{gsave TR -.1 -.1 TR rulex ruley scale 1 1 false RMat{BDot}imagemask
  227. grestore}B /a{moveto}B /delta 0 N /tail{dup /delta X 0 rmoveto}B /M{S p delta
  228. add tail}B /b{S p tail}B /c{-4 M}B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{
  229. 1 M}B /i{2 M}B /j{3 M}B /k{4 M}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p -1 w
  230. }B /q{p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /w{0 rmoveto}B /x{0 S rmoveto}
  231. B /y{3 2 roll p a}B /bos{/SS save N}B /eos{clear SS restore}B end
  232. %%EndProcSet
  233. TeXDict begin 1000 400 400 @start /Fa 1 49 df<03C007E007E007E00FE00FC00FC00F80
  234. 1F801F001F003F003E003E007C007C007C007800F800F00010000B157F950F>48
  235. D E /Fb 3 62 df<0006000E001C0038007000E001C003C0038007800F000F001F001E003E003E
  236. 003C007C007C007C007C007C00FC00F800F800F800F800F800F800F800F800F800F800FC007C00
  237. 7C007C007C007C003C003E003E001E001F000F000F000780038003C001C000E000700038001C00
  238. 0E00060F387BA919>40 D<8000C000E000700038001C000E000F000700078003C003C003E001E0
  239. 01F001F000F000F800F800F800F800F800FC007C007C007C007C007C007C007C007C007C007C00
  240. FC00F800F800F800F800F800F001F001F001E003E003C003C0078007000F000E001C0038007000
  241. E000C00080000E387BA919>I<7FFFFFFFFF00FFFFFFFFFF80FFFFFFFFFF80FFFFFFFFFF800000
  242. 000000000000000000000000000000000000000000000000000000000000000000000000000000
  243. 00000000000000000000000000000000000000FFFFFFFFFF80FFFFFFFFFF80FFFFFFFFFF807FFF
  244. FFFFFF0029127C9632>61 D E /Fc 4 121 df<003FFFFFFF80007FFFFFFF80003FFFFFFF8000
  245. 01FE003F800003FC000F800003FC0007800003FC0007800003FC0007800007F80007800007F800
  246. 07800007F80007000007F80C0700000FF01C0700000FF01C0300000FF01C0000000FF03C000000
  247. 1FE0780000001FFFF80000001FFFF80000001FFFF80000003FC0F00000003FC0700000003FC070
  248. 0000003FC0700000007F80E00000007F80600000007F80000000007F8000000000FF0000000000
  249. FF0000000000FF0000000000FF0000000001FE0000000001FE0000000001FE000000007FFFF800
  250. 0000FFFFFC0000007FFFF800000029267EA526>70 D<07C01FC00FE0000FF07FF03FF80018F8E0
  251. F8707C0038FB80FDC07E0070FF007F803E0070FE007F003E0070FC007E003E00E1FC00FE007E00
  252. E1F800FC007E0001F800FC007E0001F800FC007E0003F001F800FC0003F001F800FC0003F001F8
  253. 00FC0003F001F801F80007E003F001F80007E003F001F87007E003F003F07007E003F003F0600F
  254. C007E007E0E00FC007E007E0C00FC007E003E1C00FC007E003E3800F8007C001FF000700038000
  255. 7C0034197E9839>109 D<001C00003E00007E00007E00007E0000FC0000FC0000FC0000FC0001
  256. F8007FFFC0FFFFC0FFFF8003F00003F00003F00003F00007E00007E00007E00007E0000FC0000F
  257. C0000FC0000FC0001F80001F81C01F81C01F83803F03803F07001F06000F8C0007F80003F00012
  258. 237FA217>116 D<00FE03C003FF8FF00787DC380E03F83C1C03F07C3803F0FC3803F0FC7007E0
  259. F87007E0700007E0000007E000000FC000000FC000000FC000000FC000001F8000381F80387C1F
  260. 80387E1F8070FC3F0070FC3F00E0787F81C070E787803FC3FF000F80FC001E197E9824>120
  261. D E end
  262. %%EndProlog
  263. %%BeginSetup
  264. %%Feature: *Resolution 400
  265. TeXDict begin @letter
  266. %%EndSetup
  267. %%Page: 1 1
  268. bop 0 55 a Fc(F)9 b Fb(\()p Fc(t)p Fb(\))17 b(=)g Fc(m)11 b
  269. Fb(\()p Fc(x)333 32 y Fa(0)351 55 y Fb(\))376 32 y Fa(0)394
  270. 55 y Fb(\()p Fc(t)p Fb(\))p eop
  271. %%Trailer
  272. end
  273. userdict /end-hook known{end-hook}if
  274. %%EOF
  275.  
  276. % End of user PostScript
  277. % End of Graphics
  278. MathPictureEnd
  279. :[font = text; inactive; preserveAspect; endGroup; ]
  280. If we define the forcing function "F(t)" and assign a value to the rest mass "m", then we will have a second order ordinary differential equation to solve. The general theory of equations like this states that if "F(t)" is continuous on some interval, say [a,b], then there exists a unique solution to this differential equation for any numbers r and s, with the initial position x(a) = r and the initial velocity x'(a) = s.
  281. :[font = section; inactive; pageBreak; preserveAspect; startGroup; ]
  282. Defining the Problem
  283. :[font = text; inactive; preserveAspect; ]
  284. Let's use Mathematica to solve a particular problem. We will first define the rest mass "m" of the object and the time interval [a,b]:
  285. :[font = input; preserveAspect; ]
  286. m = 1.0;
  287. a = 0.0;
  288. b = 1.0;
  289. :[font = text; inactive; preserveAspect; ]
  290. Now we will assume that the forcing function "F(t)" has the following form:
  291. :[font = input; preserveAspect; ]
  292. F[t_] := m 32.0;
  293. :[font = text; inactive; preserveAspect; ]
  294. Finally, we will assume that the initial conditions, defining the initial position "x(a)" and the initial velocity "x`(a)" are:
  295. :[font = input; preserveAspect; endGroup; ]
  296. r = 0.0;
  297. s = 0.0;
  298. :[font = section; inactive; pageBreak; preserveAspect; startGroup; ]
  299. The Mathematica Solution
  300. :[font = text; inactive; preserveAspect; ]
  301. We may now use the Mathematica intrinsic "Integrate" to compute the general solution described by the above assumptions.
  302. :[font = input; closed; preserveAspect; startGroup; ]
  303. TeXDisplay["(x'[t]=Subscripted[c[1]]+Integrate[F[t]/m,
  304. {t,Subscripted[t[0]],t}])//HoldForm"]
  305. :[font = postscript; PostScript; formatAsPostScript; output; inactive; preserveAspect; pictureLeft = 86; pictureWidth = 309; pictureHeight = 80; endGroup; ]
  306. %!
  307. %%Creator: Mathematica
  308. %%AspectRatio: 0.25948 
  309. MathPictureStart
  310. /Courier findfont 10  scalefont  setfont
  311. % Scaling calculations
  312. 0.02381 0.952381 0.006178 0.247126 [
  313. [ 0 0 0 0 ]
  314. [ 1 0.259482 0 0 ]
  315. ] MathScale
  316. % Start of Graphics
  317. 1 setlinecap
  318. 1 setlinejoin
  319. newpath
  320. %%Object: Graphics
  321. [ ] 0 setdash
  322. 0 setgray
  323. gsave
  324. grestore
  325. 0 0 moveto
  326. 1 0 lineto
  327. 1 0.25948 lineto
  328. 0 0.25948 lineto
  329. closepath
  330. clip
  331. newpath
  332. % Start of user PostScript
  333. %!PS-Adobe-2.0
  334. %%Creator: dvips, version 5.396 (C) 1986-90 Radical Eye Software
  335. %%Title: .TTMFILE.dvi
  336. %%Pages: 1 1
  337. 0.008738 0.008738 scale
  338. -72.000000 -692.505310 translate
  339. %%BoundingBox: 0 0 612 792
  340. %%EndComments
  341. %%BeginProcSet: tex.pro
  342. /TeXDict 200 dict def TeXDict begin /N /def load def /B{bind def}N /S /exch
  343. load def /X{S N}B /TR /translate load N /isls false N /vsize 10 N /@rigin{
  344. isls{[0 1 -1 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale
  345. Resolution VResolution vsize neg mul TR}B /@letter{/vsize 10 N}B /@landscape{
  346. /isls true N /vsize -1 N}B /@a4{/vsize 10.6929133858 N}B /@legal{/vsize 13 N}
  347. B /@manualfeed{statusdict /manualfeed true put}B /@copies{/#copies X}B /FMat[
  348. 1 0 0 -1 0 0]N /FBB[0 0 0 0]N /df{/sf 1 N /fntrx FMat N df-tail}B /dfs{div /sf
  349. X /fntrx[sf 0 0 sf neg 0 0]N df-tail}B /df-tail{/nn 8 dict N nn begin
  350. /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N string /base X array
  351. /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N end dup{/foo setfont}2
  352. array copy cvx N load 0 nn put /ctr 0 N[}B /E{pop nn dup definefont setfont}B
  353. /ch-image{ch-data dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B
  354. /ch-width{ch-data dup length 5 sub get}B /ch-height{ch-data dup length 4 sub
  355. get}B /ch-xoff{128 ch-data dup length 3 sub get sub}B /ch-yoff{ch-data dup
  356. length 2 sub get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B /ctr 0 N
  357. /CharBuilder{save 3 1 roll S dup /base get 2 index get S /BitMaps get S get
  358. /ch-data X pop /ctr 0 N ch-dx 0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width
  359. add ch-yoff setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub
  360. ch-yoff .1 add]{ch-image}imagemask restore}B /D{/cc X dup type /stringtype ne{
  361. ]}if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup length 1
  362. sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{cc 1 add D}B
  363. /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin 0 0 moveto}B /eop{
  364. clear SI restore showpage userdict /eop-hook known{eop-hook}if}B /@start{
  365. userdict /start-hook known{start-hook}if /VResolution X /Resolution X 1000 div
  366. /DVImag X /IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for}
  367. B /p /show load N /RMat[1 0 0 -1 0 0]N /BDot 8 string N /v{/ruley X /rulex X V
  368. }B /V{gsave TR -.1 -.1 TR rulex ruley scale 1 1 false RMat{BDot}imagemask
  369. grestore}B /a{moveto}B /delta 0 N /tail{dup /delta X 0 rmoveto}B /M{S p delta
  370. add tail}B /b{S p tail}B /c{-4 M}B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{
  371. 1 M}B /i{2 M}B /j{3 M}B /k{4 M}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p -1 w
  372. }B /q{p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /w{0 rmoveto}B /x{0 S rmoveto}
  373. B /y{3 2 roll p a}B /bos{/SS save N}B /eos{clear SS restore}B end
  374. %%EndProcSet
  375. TeXDict begin 1000 400 400 @start /Fa 1 49 df<0FE01FF03838701C701CF01EF01EF01E
  376. F01EF01EF01EF01EF01E701C783C38383FF80FE00F127E9115>48 D E /Fb
  377. 1 117 df<00E001F001F003E003E003E003E007C07FFCFFFC07C00F800F800F800F801F001F00
  378. 1F001F003E0C3E0C3E183E301FE007C00E197F9813>116 D E /Fc 1 91
  379. df<00000000007C000000000000C2000000000001870000000000038F8000000000038F800000
  380. 0000070F8000000000070700000000000F0000000000000E0000000000001E0000000000001E00
  381. 00000000001E0000000000003C0000000000003C0000000000003C0000000000007C0000000000
  382. 00780000000000007800000000000078000000000000F8000000000000F8000000000000F00000
  383. 00000000F0000000000001F0000000000001F0000000000001F0000000000001E0000000000003
  384. E0000000000003E0000000000003E0000000000003E0000000000007C0000000000007C0000000
  385. 000007C0000000000007C0000000000007C000000000000FC000000000000F8000000000000F80
  386. 00000000000F8000000000001F8000000000001F8000000000001F8000000000001F0000000000
  387. 001F0000000000003F0000000000003F0000000000003F0000000000003E0000000000007E0000
  388. 000000007E0000000000007E0000000000007E0000000000007E000000000000FC000000000000
  389. FC000000000000FC000000000000FC000000000000FC000000000001F8000000000001F8000000
  390. 000001F8000000000001F8000000000001F8000000000003F0000000000003F0000000000003F0
  391. 000000000003F0000000000003F0000000000007E0000000000007E0000000000007E000000000
  392. 0007E0000000000007E0000000000007C000000000000FC000000000000FC000000000000FC000
  393. 000000000F8000000000000F8000000000001F8000000000001F8000000000001F800000000000
  394. 1F0000000000001F0000000000001F0000000000003F0000000000003E0000000000003E000000
  395. 0000003E0000000000003E0000000000003E0000000000007C0000000000007C0000000000007C
  396. 0000000000007C00000000000078000000000000F8000000000000F8000000000000F800000000
  397. 0000F0000000000000F0000000000001F0000000000001F0000000000001E0000000000001E000
  398. 0000000001E0000000000003C0000000000003C0000000000003C0000000000003800000000000
  399. 0780000000000007800000000000070000000000000F0000000000000E0000000000701E000000
  400. 0000F81C0000000000F81C0000000000F83800000000007070000000000020E000000000001F80
  401. 0000000000317B7D7F1F>90 D E /Fd 1 50 df<00E00003E000FFE000FFE00003E00003E00003
  402. E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003
  403. E00003E00003E00003E000FFFF80FFFF8011197C9819>49 D E /Fe 4 62
  404. df<0006000E001C0038007000E001C003C0038007800F000F001F001E003E003E003C007C007C
  405. 007C007C007C00FC00F800F800F800F800F800F800F800F800F800F800FC007C007C007C007C00
  406. 7C003C003E003E001E001F000F000F000780038003C001C000E000700038001C000E00060F387B
  407. A919>40 D<8000C000E000700038001C000E000F000700078003C003C003E001E001F001F000F0
  408. 00F800F800F800F800F800FC007C007C007C007C007C007C007C007C007C007C00FC00F800F800
  409. F800F800F800F001F001F001E003E003C003C0078007000F000E001C0038007000E000C0008000
  410. 0E387BA919>I<00000C00000000001E00000000001E00000000001E00000000001E0000000000
  411. 1E00000000001E00000000001E00000000001E00000000001E00000000001E00000000001E0000
  412. 0000001E00000000001E00000000001E00000000001E00000000001E00000000001E0000000000
  413. 1E0000007FFFFFFFFF00FFFFFFFFFF80FFFFFFFFFF807FFFFFFFFF0000001E00000000001E0000
  414. 0000001E00000000001E00000000001E00000000001E00000000001E00000000001E0000000000
  415. 1E00000000001E00000000001E00000000001E00000000001E00000000001E00000000001E0000
  416. 0000001E00000000001E00000000001E00000000000C000000292A7CA232>43
  417. D<7FFFFFFFFF00FFFFFFFFFF80FFFFFFFFFF80FFFFFFFFFF800000000000000000000000000000
  418. 000000000000000000000000000000000000000000000000000000000000000000000000000000
  419. 00000000000000FFFFFFFFFF80FFFFFFFFFF80FFFFFFFFFF807FFFFFFFFF0029127C9632>61
  420. D E /Ff 1 49 df<03C007E007E007E00FE00FC00FC00F801F801F001F003F003E003E007C007C
  421. 007C007800F800F00010000B157F950F>48 D E /Fg 6 121 df<003FFFFFFF80007FFFFFFF80
  422. 003FFFFFFF800001FE003F800003FC000F800003FC0007800003FC0007800003FC0007800007F8
  423. 0007800007F80007800007F80007000007F80C0700000FF01C0700000FF01C0300000FF01C0000
  424. 000FF03C0000001FE0780000001FFFF80000001FFFF80000001FFFF80000003FC0F00000003FC0
  425. 700000003FC0700000003FC0700000007F80E00000007F80600000007F80000000007F80000000
  426. 00FF0000000000FF0000000000FF0000000000FF0000000001FE0000000001FE0000000001FE00
  427. 0000007FFFF8000000FFFFFC0000007FFFF800000029267EA526>70 D<000FE0007FF801FC1C03
  428. F01E07C03E0FC07E1F807E3F807C3F00387F00007F0000FE0000FE0000FE0000FE0000FC0000FC
  429. 0000FC0000FC00027C00077C000F3E003E1F01F80FFFF001FF0018197D981C>99
  430. D<00000FF800001FF800001FF8000001F8000003F0000003F0000003F0000003F0000007E00000
  431. 07E0000007E0000007E000000FC0001F8FC0007FEFC001F87FC003E03F8007C01F800F801F801F
  432. 801F803F803F003F003F007F003F007F003F00FE007E00FE007E00FE007E00FE007E00FC00FC00
  433. FC00FC38FC00FC38FC00FC38FC01F8707C01F8707C03F8603E0E7CE00FFC3FC003F01F001D267D
  434. A522>I<07C01FC00FE0000FF07FF03FF80018F8E0F8707C0038FB80FDC07E0070FF007F803E00
  435. 70FE007F003E0070FC007E003E00E1FC00FE007E00E1F800FC007E0001F800FC007E0001F800FC
  436. 007E0003F001F800FC0003F001F800FC0003F001F800FC0003F001F801F80007E003F001F80007
  437. E003F001F87007E003F003F07007E003F003F0600FC007E007E0E00FC007E007E0C00FC007E003
  438. E1C00FC007E003E3800F8007C001FF0007000380007C0034197E9839>109
  439. D<001C00003E00007E00007E00007E0000FC0000FC0000FC0000FC0001F8007FFFC0FFFFC0FFFF
  440. 8003F00003F00003F00003F00007E00007E00007E00007E0000FC0000FC0000FC0000FC0001F80
  441. 001F81C01F81C01F83803F03803F07001F06000F8C0007F80003F00012237FA217>116
  442. D<00FE03C003FF8FF00787DC380E03F83C1C03F07C3803F0FC3803F0FC7007E0F87007E0700007
  443. E0000007E000000FC000000FC000000FC000000FC000001F8000381F80387C1F80387E1F8070FC
  444. 3F0070FC3F00E0787F81C070E787803FC3FF000F80FC001E197E9824>120
  445. D E end
  446. %%EndProlog
  447. %%BeginSetup
  448. %%Feature: *Resolution 400
  449. TeXDict begin @letter
  450. %%EndSetup
  451. %%Page: 1 1
  452. bop 0 86 a Fg(x)36 63 y Ff(0)54 86 y Fe(\()p Fg(t)p Fe(\))17
  453. b(=)h Fg(c)240 94 y Fd(1)282 86 y Fe(+)346 11 y Fc(Z)401 25
  454. y Fb(t)376 137 y(t)395 143 y Fa(0)440 45 y Fg(F)9 b Fe(\()p
  455. Fg(t)p Fe(\))p 440 74 120 3 v 471 128 a Fg(m)577 86 y(dt)p
  456. eop
  457. %%Trailer
  458. end
  459. userdict /end-hook known{end-hook}if
  460. %%EOF
  461.  
  462. % End of user PostScript
  463. % End of Graphics
  464. MathPictureEnd
  465. :[font = input; closed; preserveAspect; startGroup; ]
  466. TeXDisplay["(x[t]=Subscripted[c[2]]+Integrate[x'[t],
  467. {t,Subscripted[t[0]],t}])//HoldForm"]
  468. :[font = postscript; PostScript; formatAsPostScript; output; inactive; preserveAspect; pictureLeft = 88; pictureWidth = 303; pictureHeight = 82; endGroup; ]
  469. %!
  470. %%Creator: Mathematica
  471. %%AspectRatio: 0.2696 
  472. MathPictureStart
  473. /Courier findfont 10  scalefont  setfont
  474. % Scaling calculations
  475. 0.02381 0.952381 0.006419 0.256765 [
  476. [ 0 0 0 0 ]
  477. [ 1 0.269603 0 0 ]
  478. ] MathScale
  479. % Start of Graphics
  480. 1 setlinecap
  481. 1 setlinejoin
  482. newpath
  483. %%Object: Graphics
  484. [ ] 0 setdash
  485. 0 setgray
  486. gsave
  487. grestore
  488. 0 0 moveto
  489. 1 0 lineto
  490. 1 0.2696 lineto
  491. 0 0.2696 lineto
  492. closepath
  493. clip
  494. newpath
  495. % Start of user PostScript
  496. %!PS-Adobe-2.0
  497. %%Creator: dvips, version 5.396 (C) 1986-90 Radical Eye Software
  498. %%Title: .TTMFILE.dvi
  499. %%Pages: 1 1
  500. 0.009079 0.009079 scale
  501. -72.000000 -692.505310 translate
  502. %%BoundingBox: 0 0 612 792
  503. %%EndComments
  504. %%BeginProcSet: tex.pro
  505. /TeXDict 200 dict def TeXDict begin /N /def load def /B{bind def}N /S /exch
  506. load def /X{S N}B /TR /translate load N /isls false N /vsize 10 N /@rigin{
  507. isls{[0 1 -1 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale
  508. Resolution VResolution vsize neg mul TR}B /@letter{/vsize 10 N}B /@landscape{
  509. /isls true N /vsize -1 N}B /@a4{/vsize 10.6929133858 N}B /@legal{/vsize 13 N}
  510. B /@manualfeed{statusdict /manualfeed true put}B /@copies{/#copies X}B /FMat[
  511. 1 0 0 -1 0 0]N /FBB[0 0 0 0]N /df{/sf 1 N /fntrx FMat N df-tail}B /dfs{div /sf
  512. X /fntrx[sf 0 0 sf neg 0 0]N df-tail}B /df-tail{/nn 8 dict N nn begin
  513. /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N string /base X array
  514. /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N end dup{/foo setfont}2
  515. array copy cvx N load 0 nn put /ctr 0 N[}B /E{pop nn dup definefont setfont}B
  516. /ch-image{ch-data dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B
  517. /ch-width{ch-data dup length 5 sub get}B /ch-height{ch-data dup length 4 sub
  518. get}B /ch-xoff{128 ch-data dup length 3 sub get sub}B /ch-yoff{ch-data dup
  519. length 2 sub get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B /ctr 0 N
  520. /CharBuilder{save 3 1 roll S dup /base get 2 index get S /BitMaps get S get
  521. /ch-data X pop /ctr 0 N ch-dx 0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width
  522. add ch-yoff setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub
  523. ch-yoff .1 add]{ch-image}imagemask restore}B /D{/cc X dup type /stringtype ne{
  524. ]}if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup length 1
  525. sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{cc 1 add D}B
  526. /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin 0 0 moveto}B /eop{
  527. clear SI restore showpage userdict /eop-hook known{eop-hook}if}B /@start{
  528. userdict /start-hook known{start-hook}if /VResolution X /Resolution X 1000 div
  529. /DVImag X /IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for}
  530. B /p /show load N /RMat[1 0 0 -1 0 0]N /BDot 8 string N /v{/ruley X /rulex X V
  531. }B /V{gsave TR -.1 -.1 TR rulex ruley scale 1 1 false RMat{BDot}imagemask
  532. grestore}B /a{moveto}B /delta 0 N /tail{dup /delta X 0 rmoveto}B /M{S p delta
  533. add tail}B /b{S p tail}B /c{-4 M}B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{
  534. 1 M}B /i{2 M}B /j{3 M}B /k{4 M}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p -1 w
  535. }B /q{p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /w{0 rmoveto}B /x{0 S rmoveto}
  536. B /y{3 2 roll p a}B /bos{/SS save N}B /eos{clear SS restore}B end
  537. %%EndProcSet
  538. TeXDict begin 1000 400 400 @start /Fa 1 49 df<03C007E007E007E00FE00FC00FC00F80
  539. 1F801F001F003F003E003E007C007C007C007800F800F00010000B157F950F>48
  540. D E /Fb 1 49 df<0FE01FF03838701C701CF01EF01EF01EF01EF01EF01EF01EF01E701C783C38
  541. 383FF80FE00F127E9115>48 D E /Fc 1 117 df<00E001F001F003E003E003E003E007C07FFC
  542. FFFC07C00F800F800F800F801F001F001F001F003E0C3E0C3E183E301FE007C00E197F9813>
  543. 116 D E /Fd 1 91 df<00000000007C000000000000C2000000000001870000000000038F8000
  544. 000000038F8000000000070F8000000000070700000000000F0000000000000E0000000000001E
  545. 0000000000001E0000000000001E0000000000003C0000000000003C0000000000003C00000000
  546. 00007C000000000000780000000000007800000000000078000000000000F8000000000000F800
  547. 0000000000F0000000000000F0000000000001F0000000000001F0000000000001F00000000000
  548. 01E0000000000003E0000000000003E0000000000003E0000000000003E0000000000007C00000
  549. 00000007C0000000000007C0000000000007C0000000000007C000000000000FC000000000000F
  550. 8000000000000F8000000000000F8000000000001F8000000000001F8000000000001F80000000
  551. 00001F0000000000001F0000000000003F0000000000003F0000000000003F0000000000003E00
  552. 00000000007E0000000000007E0000000000007E0000000000007E0000000000007E0000000000
  553. 00FC000000000000FC000000000000FC000000000000FC000000000000FC000000000001F80000
  554. 00000001F8000000000001F8000000000001F8000000000001F8000000000003F0000000000003
  555. F0000000000003F0000000000003F0000000000003F0000000000007E0000000000007E0000000
  556. 000007E0000000000007E0000000000007E0000000000007C000000000000FC000000000000FC0
  557. 00000000000FC000000000000F8000000000000F8000000000001F8000000000001F8000000000
  558. 001F8000000000001F0000000000001F0000000000001F0000000000003F0000000000003E0000
  559. 000000003E0000000000003E0000000000003E0000000000003E0000000000007C000000000000
  560. 7C0000000000007C0000000000007C00000000000078000000000000F8000000000000F8000000
  561. 000000F8000000000000F0000000000000F0000000000001F0000000000001F0000000000001E0
  562. 000000000001E0000000000001E0000000000003C0000000000003C0000000000003C000000000
  563. 00038000000000000780000000000007800000000000070000000000000F0000000000000E0000
  564. 000000701E0000000000F81C0000000000F81C0000000000F83800000000007070000000000020
  565. E000000000001F800000000000317B7D7F1F>90 D E /Fe 1 51 df<07FC003FFF00701FC0F807
  566. E0FC03E0FC03F0FC01F07801F00003F00003F00003E00007C0000F80000F00003C0000780000E0
  567. 3001C0300300300600701FFFE03FFFE07FFFE0FFFFE0FFFFE014197E9819>50
  568. D E /Ff 4 62 df<0006000E001C0038007000E001C003C0038007800F000F001F001E003E003E
  569. 003C007C007C007C007C007C00FC00F800F800F800F800F800F800F800F800F800F800FC007C00
  570. 7C007C007C007C003C003E003E001E001F000F000F000780038003C001C000E000700038001C00
  571. 0E00060F387BA919>40 D<8000C000E000700038001C000E000F000700078003C003C003E001E0
  572. 01F001F000F000F800F800F800F800F800FC007C007C007C007C007C007C007C007C007C007C00
  573. FC00F800F800F800F800F800F001F001F001E003E003C003C0078007000F000E001C0038007000
  574. E000C00080000E387BA919>I<00000C00000000001E00000000001E00000000001E0000000000
  575. 1E00000000001E00000000001E00000000001E00000000001E00000000001E00000000001E0000
  576. 0000001E00000000001E00000000001E00000000001E00000000001E00000000001E0000000000
  577. 1E00000000001E0000007FFFFFFFFF00FFFFFFFFFF80FFFFFFFFFF807FFFFFFFFF0000001E0000
  578. 0000001E00000000001E00000000001E00000000001E00000000001E00000000001E0000000000
  579. 1E00000000001E00000000001E00000000001E00000000001E00000000001E00000000001E0000
  580. 0000001E00000000001E00000000001E00000000001E00000000000C000000292A7CA232>43
  581. D<7FFFFFFFFF00FFFFFFFFFF80FFFFFFFFFF80FFFFFFFFFF800000000000000000000000000000
  582. 000000000000000000000000000000000000000000000000000000000000000000000000000000
  583. 00000000000000FFFFFFFFFF80FFFFFFFFFF80FFFFFFFFFF807FFFFFFFFF0029127C9632>61
  584. D E /Fg 4 121 df<000FE0007FF801FC1C03F01E07C03E0FC07E1F807E3F807C3F00387F0000
  585. 7F0000FE0000FE0000FE0000FE0000FC0000FC0000FC0000FC00027C00077C000F3E003E1F01F8
  586. 0FFFF001FF0018197D981C>99 D<00000FF800001FF800001FF8000001F8000003F0000003F000
  587. 0003F0000003F0000007E0000007E0000007E0000007E000000FC0001F8FC0007FEFC001F87FC0
  588. 03E03F8007C01F800F801F801F801F803F803F003F003F007F003F007F003F00FE007E00FE007E
  589. 00FE007E00FE007E00FC00FC00FC00FC38FC00FC38FC00FC38FC01F8707C01F8707C03F8603E0E
  590. 7CE00FFC3FC003F01F001D267DA522>I<001C00003E00007E00007E00007E0000FC0000FC0000
  591. FC0000FC0001F8007FFFC0FFFFC0FFFF8003F00003F00003F00003F00007E00007E00007E00007
  592. E0000FC0000FC0000FC0000FC0001F80001F81C01F81C01F83803F03803F07001F06000F8C0007
  593. F80003F00012237FA217>116 D<00FE03C003FF8FF00787DC380E03F83C1C03F07C3803F0FC38
  594. 03F0FC7007E0F87007E0700007E0000007E000000FC000000FC000000FC000000FC000001F8000
  595. 381F80387C1F80387E1F8070FC3F0070FC3F00E0787F81C070E787803FC3FF000F80FC001E197E
  596. 9824>120 D E end
  597. %%EndProlog
  598. %%BeginSetup
  599. %%Feature: *Resolution 400
  600. TeXDict begin @letter
  601. %%EndSetup
  602. %%Page: 1 1
  603. bop 0 86 a Fg(x)p Ff(\()p Fg(t)p Ff(\))18 b(=)f Fg(c)222 94
  604. y Fe(2)264 86 y Ff(+)328 11 y Fd(Z)383 25 y Fc(t)359 137 y(t)378
  605. 143 y Fb(0)416 86 y Fg(x)452 63 y Fa(0)470 86 y Ff(\()p Fg(t)p
  606. Ff(\))10 b Fg(dt)p eop
  607. %%Trailer
  608. end
  609. userdict /end-hook known{end-hook}if
  610. %%EOF
  611.  
  612. % End of user PostScript
  613. % End of Graphics
  614. MathPictureEnd
  615. :[font = input; preserveAspect; startGroup; ]
  616. x[t_] = Integrate[Integrate[F[t]/m,t]+c[1],t]+c[2]
  617. :[font = output; output; inactive; preserveAspect; endGroup; ]
  618. 16.*t^2 + t*c[1] + c[2]
  619. ;[o]
  620.      2
  621. 16. t  + t c[1] + c[2]
  622. :[font = text; inactive; preserveAspect; ]
  623. The initial conditions allow us to compute specific values for the constants of integration using "Solve."
  624. :[font = input; preserveAspect; startGroup; ]
  625. constants = Solve[{x[a]==r , x'[a]==s},Table[c[i],{i,1,2}]]
  626. :[font = output; output; inactive; preserveAspect; endGroup; ]
  627. {{c[1] -> 0, c[2] -> 0}}
  628. ;[o]
  629. {{c[1] -> 0, c[2] -> 0}}
  630. :[font = text; inactive; preserveAspect; ]
  631. Now, these rules can be used to develop the unique solution defined by the initial conditions.
  632. :[font = input; preserveAspect; startGroup; ]
  633. solution = Chop[(x[t]/.constants)[[1]]]
  634. :[font = output; output; inactive; preserveAspect; endGroup; ]
  635. 16.*t^2
  636. ;[o]
  637.      2
  638. 16. t
  639. :[font = text; inactive; preserveAspect; ]
  640. We may plot this solution over the interval [a,b] using "Plot."
  641. :[font = input; preserveAspect; startGroup; ]
  642. Plot[16 t^2,{t,0,1},PlotRange->All,
  643.                     Frame->True,                
  644.                     FrameLabel->{"t","x(t)"},
  645.                     PlotStyle->{Thickness[.01]},
  646.                     PlotLabel->FontForm["Solution to x''(t) = F(t)/m",
  647.                                 {"Helvetica-Bold",12}]];
  648. :[font = postscript; PostScript; formatAsPostScript; output; inactive; preserveAspect; pictureLeft = 34; pictureWidth = 373; pictureHeight = 230; endGroup; endGroup; ]
  649. %!
  650. %%Creator: Mathematica
  651. %%AspectRatio: 0.61803 
  652. MathPictureStart
  653. /Courier findfont 10  scalefont  setfont
  654. % Scaling calculations
  655. 0.02381 0.952381 0.014715 0.036788 [
  656. [(0)] 0.02381 0 0 2 0 Minner Mrotsboxa
  657. [(0.2)] 0.21429 0 0 2 0 Minner Mrotsboxa
  658. [(0.4)] 0.40476 0 0 2 0 Minner Mrotsboxa
  659. [(0.6)] 0.59524 0 0 2 0 Minner Mrotsboxa
  660. [(0.8)] 0.78571 0 0 2 0 Minner Mrotsboxa
  661. [(1)] 0.97619 0 0 2 0 Minner Mrotsboxa
  662. [(t)] 0.5 0 0 2 0 0 -1 Mouter Mrotsboxa
  663. [(0)] -0.0125 0.01472 1 0 0 Minner Mrotsboxa
  664. [(2.5)] -0.0125 0.10668 1 0 0 Minner Mrotsboxa
  665. [(5)] -0.0125 0.19865 1 0 0 Minner Mrotsboxa
  666. [(7.5)] -0.0125 0.29062 1 0 0 Minner Mrotsboxa
  667. [(10)] -0.0125 0.38259 1 0 0 Minner Mrotsboxa
  668. [(12.5)] -0.0125 0.47456 1 0 0 Minner Mrotsboxa
  669. [(15)] -0.0125 0.56653 1 0 0 Minner Mrotsboxa
  670. [(x\(t\))] -0.0125 0.30902 1 0 90 -1 0 Mouter Mrotsboxa
  671. gsave
  672. /Helvetica-Bold findfont 12 scalefont setfont
  673. [(Solution to x''\(t\) = F\(t\)/m)] 0.5 0.61803 0 -2 Msboxa
  674. grestore
  675. [ -0.001 -0.001 0 0 ]
  676. [ 1.001 0.61903 0 0 ]
  677. ] MathScale
  678. % Start of Graphics
  679. 1 setlinecap
  680. 1 setlinejoin
  681. newpath
  682. %%Object: Graphics
  683. [ ] 0 setdash
  684. 0 setgray
  685. gsave
  686. gsave
  687. 0.002 setlinewidth
  688. 0.02381 0 moveto
  689. 0.02381 0.00625 lineto
  690. stroke
  691. grestore
  692. [(0)] 0.02381 0 0 2 0 Minner Mrotshowa
  693. gsave
  694. 0.002 setlinewidth
  695. 0.21429 0 moveto
  696. 0.21429 0.00625 lineto
  697. stroke
  698. grestore
  699. [(0.2)] 0.21429 0 0 2 0 Minner Mrotshowa
  700. gsave
  701. 0.002 setlinewidth
  702. 0.40476 0 moveto
  703. 0.40476 0.00625 lineto
  704. stroke
  705. grestore
  706. [(0.4)] 0.40476 0 0 2 0 Minner Mrotshowa
  707. gsave
  708. 0.002 setlinewidth
  709. 0.59524 0 moveto
  710. 0.59524 0.00625 lineto
  711. stroke
  712. grestore
  713. [(0.6)] 0.59524 0 0 2 0 Minner Mrotshowa
  714. gsave
  715. 0.002 setlinewidth
  716. 0.78571 0 moveto
  717. 0.78571 0.00625 lineto
  718. stroke
  719. grestore
  720. [(0.8)] 0.78571 0 0 2 0 Minner Mrotshowa
  721. gsave
  722. 0.002 setlinewidth
  723. 0.97619 0 moveto
  724. 0.97619 0.00625 lineto
  725. stroke
  726. grestore
  727. [(1)] 0.97619 0 0 2 0 Minner Mrotshowa
  728. gsave
  729. 0.001 setlinewidth
  730. 0.0619 0 moveto
  731. 0.0619 0.00375 lineto
  732. stroke
  733. grestore
  734. gsave
  735. 0.001 setlinewidth
  736. 0.1 0 moveto
  737. 0.1 0.00375 lineto
  738. stroke
  739. grestore
  740. gsave
  741. 0.001 setlinewidth
  742. 0.1381 0 moveto
  743. 0.1381 0.00375 lineto
  744. stroke
  745. grestore
  746. gsave
  747. 0.001 setlinewidth
  748. 0.17619 0 moveto
  749. 0.17619 0.00375 lineto
  750. stroke
  751. grestore
  752. gsave
  753. 0.001 setlinewidth
  754. 0.25238 0 moveto
  755. 0.25238 0.00375 lineto
  756. stroke
  757. grestore
  758. gsave
  759. 0.001 setlinewidth
  760. 0.29048 0 moveto
  761. 0.29048 0.00375 lineto
  762. stroke
  763. grestore
  764. gsave
  765. 0.001 setlinewidth
  766. 0.32857 0 moveto
  767. 0.32857 0.00375 lineto
  768. stroke
  769. grestore
  770. gsave
  771. 0.001 setlinewidth
  772. 0.36667 0 moveto
  773. 0.36667 0.00375 lineto
  774. stroke
  775. grestore
  776. gsave
  777. 0.001 setlinewidth
  778. 0.44286 0 moveto
  779. 0.44286 0.00375 lineto
  780. stroke
  781. grestore
  782. gsave
  783. 0.001 setlinewidth
  784. 0.48095 0 moveto
  785. 0.48095 0.00375 lineto
  786. stroke
  787. grestore
  788. gsave
  789. 0.001 setlinewidth
  790. 0.51905 0 moveto
  791. 0.51905 0.00375 lineto
  792. stroke
  793. grestore
  794. gsave
  795. 0.001 setlinewidth
  796. 0.55714 0 moveto
  797. 0.55714 0.00375 lineto
  798. stroke
  799. grestore
  800. gsave
  801. 0.001 setlinewidth
  802. 0.63333 0 moveto
  803. 0.63333 0.00375 lineto
  804. stroke
  805. grestore
  806. gsave
  807. 0.001 setlinewidth
  808. 0.67143 0 moveto
  809. 0.67143 0.00375 lineto
  810. stroke
  811. grestore
  812. gsave
  813. 0.001 setlinewidth
  814. 0.70952 0 moveto
  815. 0.70952 0.00375 lineto
  816. stroke
  817. grestore
  818. gsave
  819. 0.001 setlinewidth
  820. 0.74762 0 moveto
  821. 0.74762 0.00375 lineto
  822. stroke
  823. grestore
  824. gsave
  825. 0.001 setlinewidth
  826. 0.82381 0 moveto
  827. 0.82381 0.00375 lineto
  828. stroke
  829. grestore
  830. gsave
  831. 0.001 setlinewidth
  832. 0.8619 0 moveto
  833. 0.8619 0.00375 lineto
  834. stroke
  835. grestore
  836. gsave
  837. 0.001 setlinewidth
  838. 0.9 0 moveto
  839. 0.9 0.00375 lineto
  840. stroke
  841. grestore
  842. gsave
  843. 0.001 setlinewidth
  844. 0.9381 0 moveto
  845. 0.9381 0.00375 lineto
  846. stroke
  847. grestore
  848. [(t)] 0.5 0 0 2 0 0 -1 Mouter Mrotshowa
  849. gsave
  850. 0.002 setlinewidth
  851. 0 0 moveto
  852. 1 0 lineto
  853. stroke
  854. grestore
  855. gsave
  856. 0.002 setlinewidth
  857. 0 0.01472 moveto
  858. 0.00625 0.01472 lineto
  859. stroke
  860. grestore
  861. [(0)] -0.0125 0.01472 1 0 0 Minner Mrotshowa
  862. gsave
  863. 0.002 setlinewidth
  864. 0 0.10668 moveto
  865. 0.00625 0.10668 lineto
  866. stroke
  867. grestore
  868. [(2.5)] -0.0125 0.10668 1 0 0 Minner Mrotshowa
  869. gsave
  870. 0.002 setlinewidth
  871. 0 0.19865 moveto
  872. 0.00625 0.19865 lineto
  873. stroke
  874. grestore
  875. [(5)] -0.0125 0.19865 1 0 0 Minner Mrotshowa
  876. gsave
  877. 0.002 setlinewidth
  878. 0 0.29062 moveto
  879. 0.00625 0.29062 lineto
  880. stroke
  881. grestore
  882. [(7.5)] -0.0125 0.29062 1 0 0 Minner Mrotshowa
  883. gsave
  884. 0.002 setlinewidth
  885. 0 0.38259 moveto
  886. 0.00625 0.38259 lineto
  887. stroke
  888. grestore
  889. [(10)] -0.0125 0.38259 1 0 0 Minner Mrotshowa
  890. gsave
  891. 0.002 setlinewidth
  892. 0 0.47456 moveto
  893. 0.00625 0.47456 lineto
  894. stroke
  895. grestore
  896. [(12.5)] -0.0125 0.47456 1 0 0 Minner Mrotshowa
  897. gsave
  898. 0.002 setlinewidth
  899. 0 0.56653 moveto
  900. 0.00625 0.56653 lineto
  901. stroke
  902. grestore
  903. [(15)] -0.0125 0.56653 1 0 0 Minner Mrotshowa
  904. gsave
  905. 0.001 setlinewidth
  906. 0 0.03311 moveto
  907. 0.00375 0.03311 lineto
  908. stroke
  909. grestore
  910. gsave
  911. 0.001 setlinewidth
  912. 0 0.0515 moveto
  913. 0.00375 0.0515 lineto
  914. stroke
  915. grestore
  916. gsave
  917. 0.001 setlinewidth
  918. 0 0.0699 moveto
  919. 0.00375 0.0699 lineto
  920. stroke
  921. grestore
  922. gsave
  923. 0.001 setlinewidth
  924. 0 0.08829 moveto
  925. 0.00375 0.08829 lineto
  926. stroke
  927. grestore
  928. gsave
  929. 0.001 setlinewidth
  930. 0 0.12508 moveto
  931. 0.00375 0.12508 lineto
  932. stroke
  933. grestore
  934. gsave
  935. 0.001 setlinewidth
  936. 0 0.14347 moveto
  937. 0.00375 0.14347 lineto
  938. stroke
  939. grestore
  940. gsave
  941. 0.001 setlinewidth
  942. 0 0.16187 moveto
  943. 0.00375 0.16187 lineto
  944. stroke
  945. grestore
  946. gsave
  947. 0.001 setlinewidth
  948. 0 0.18026 moveto
  949. 0.00375 0.18026 lineto
  950. stroke
  951. grestore
  952. gsave
  953. 0.001 setlinewidth
  954. 0 0.21705 moveto
  955. 0.00375 0.21705 lineto
  956. stroke
  957. grestore
  958. gsave
  959. 0.001 setlinewidth
  960. 0 0.23544 moveto
  961. 0.00375 0.23544 lineto
  962. stroke
  963. grestore
  964. gsave
  965. 0.001 setlinewidth
  966. 0 0.25384 moveto
  967. 0.00375 0.25384 lineto
  968. stroke
  969. grestore
  970. gsave
  971. 0.001 setlinewidth
  972. 0 0.27223 moveto
  973. 0.00375 0.27223 lineto
  974. stroke
  975. grestore
  976. gsave
  977. 0.001 setlinewidth
  978. 0 0.30902 moveto
  979. 0.00375 0.30902 lineto
  980. stroke
  981. grestore
  982. gsave
  983. 0.001 setlinewidth
  984. 0 0.32741 moveto
  985. 0.00375 0.32741 lineto
  986. stroke
  987. grestore
  988. gsave
  989. 0.001 setlinewidth
  990. 0 0.3458 moveto
  991. 0.00375 0.3458 lineto
  992. stroke
  993. grestore
  994. gsave
  995. 0.001 setlinewidth
  996. 0 0.3642 moveto
  997. 0.00375 0.3642 lineto
  998. stroke
  999. grestore
  1000. gsave
  1001. 0.001 setlinewidth
  1002. 0 0.40099 moveto
  1003. 0.00375 0.40099 lineto
  1004. stroke
  1005. grestore
  1006. gsave
  1007. 0.001 setlinewidth
  1008. 0 0.41938 moveto
  1009. 0.00375 0.41938 lineto
  1010. stroke
  1011. grestore
  1012. gsave
  1013. 0.001 setlinewidth
  1014. 0 0.43777 moveto
  1015. 0.00375 0.43777 lineto
  1016. stroke
  1017. grestore
  1018. gsave
  1019. 0.001 setlinewidth
  1020. 0 0.45617 moveto
  1021. 0.00375 0.45617 lineto
  1022. stroke
  1023. grestore
  1024. gsave
  1025. 0.001 setlinewidth
  1026. 0 0.49296 moveto
  1027. 0.00375 0.49296 lineto
  1028. stroke
  1029. grestore
  1030. gsave
  1031. 0.001 setlinewidth
  1032. 0 0.51135 moveto
  1033. 0.00375 0.51135 lineto
  1034. stroke
  1035. grestore
  1036. gsave
  1037. 0.001 setlinewidth
  1038. 0 0.52974 moveto
  1039. 0.00375 0.52974 lineto
  1040. stroke
  1041. grestore
  1042. gsave
  1043. 0.001 setlinewidth
  1044. 0 0.54814 moveto
  1045. 0.00375 0.54814 lineto
  1046. stroke
  1047. grestore
  1048. gsave
  1049. 0.001 setlinewidth
  1050. 0 0.58493 moveto
  1051. 0.00375 0.58493 lineto
  1052. stroke
  1053. grestore
  1054. gsave
  1055. 0.001 setlinewidth
  1056. 0 0.60332 moveto
  1057. 0.00375 0.60332 lineto
  1058. stroke
  1059. grestore
  1060. [(x\(t\))] -0.0125 0.30902 1 0 90 -1 0 Mouter Mrotshowa
  1061. gsave
  1062. 0.002 setlinewidth
  1063. 0 0 moveto
  1064. 0 0.61803 lineto
  1065. stroke
  1066. grestore
  1067. grestore
  1068. gsave
  1069. gsave
  1070. 0.002 setlinewidth
  1071. 0.02381 0.61178 moveto
  1072. 0.02381 0.61803 lineto
  1073. stroke
  1074. grestore
  1075. gsave
  1076. 0.002 setlinewidth
  1077. 0.21429 0.61178 moveto
  1078. 0.21429 0.61803 lineto
  1079. stroke
  1080. grestore
  1081. gsave
  1082. 0.002 setlinewidth
  1083. 0.40476 0.61178 moveto
  1084. 0.40476 0.61803 lineto
  1085. stroke
  1086. grestore
  1087. gsave
  1088. 0.002 setlinewidth
  1089. 0.59524 0.61178 moveto
  1090. 0.59524 0.61803 lineto
  1091. stroke
  1092. grestore
  1093. gsave
  1094. 0.002 setlinewidth
  1095. 0.78571 0.61178 moveto
  1096. 0.78571 0.61803 lineto
  1097. stroke
  1098. grestore
  1099. gsave
  1100. 0.002 setlinewidth
  1101. 0.97619 0.61178 moveto
  1102. 0.97619 0.61803 lineto
  1103. stroke
  1104. grestore
  1105. gsave
  1106. 0.001 setlinewidth
  1107. 0.0619 0.61428 moveto
  1108. 0.0619 0.61803 lineto
  1109. stroke
  1110. grestore
  1111. gsave
  1112. 0.001 setlinewidth
  1113. 0.1 0.61428 moveto
  1114. 0.1 0.61803 lineto
  1115. stroke
  1116. grestore
  1117. gsave
  1118. 0.001 setlinewidth
  1119. 0.1381 0.61428 moveto
  1120. 0.1381 0.61803 lineto
  1121. stroke
  1122. grestore
  1123. gsave
  1124. 0.001 setlinewidth
  1125. 0.17619 0.61428 moveto
  1126. 0.17619 0.61803 lineto
  1127. stroke
  1128. grestore
  1129. gsave
  1130. 0.001 setlinewidth
  1131. 0.25238 0.61428 moveto
  1132. 0.25238 0.61803 lineto
  1133. stroke
  1134. grestore
  1135. gsave
  1136. 0.001 setlinewidth
  1137. 0.29048 0.61428 moveto
  1138. 0.29048 0.61803 lineto
  1139. stroke
  1140. grestore
  1141. gsave
  1142. 0.001 setlinewidth
  1143. 0.32857 0.61428 moveto
  1144. 0.32857 0.61803 lineto
  1145. stroke
  1146. grestore
  1147. gsave
  1148. 0.001 setlinewidth
  1149. 0.36667 0.61428 moveto
  1150. 0.36667 0.61803 lineto
  1151. stroke
  1152. grestore
  1153. gsave
  1154. 0.001 setlinewidth
  1155. 0.44286 0.61428 moveto
  1156. 0.44286 0.61803 lineto
  1157. stroke
  1158. grestore
  1159. gsave
  1160. 0.001 setlinewidth
  1161. 0.48095 0.61428 moveto
  1162. 0.48095 0.61803 lineto
  1163. stroke
  1164. grestore
  1165. gsave
  1166. 0.001 setlinewidth
  1167. 0.51905 0.61428 moveto
  1168. 0.51905 0.61803 lineto
  1169. stroke
  1170. grestore
  1171. gsave
  1172. 0.001 setlinewidth
  1173. 0.55714 0.61428 moveto
  1174. 0.55714 0.61803 lineto
  1175. stroke
  1176. grestore
  1177. gsave
  1178. 0.001 setlinewidth
  1179. 0.63333 0.61428 moveto
  1180. 0.63333 0.61803 lineto
  1181. stroke
  1182. grestore
  1183. gsave
  1184. 0.001 setlinewidth
  1185. 0.67143 0.61428 moveto
  1186. 0.67143 0.61803 lineto
  1187. stroke
  1188. grestore
  1189. gsave
  1190. 0.001 setlinewidth
  1191. 0.70952 0.61428 moveto
  1192. 0.70952 0.61803 lineto
  1193. stroke
  1194. grestore
  1195. gsave
  1196. 0.001 setlinewidth
  1197. 0.74762 0.61428 moveto
  1198. 0.74762 0.61803 lineto
  1199. stroke
  1200. grestore
  1201. gsave
  1202. 0.001 setlinewidth
  1203. 0.82381 0.61428 moveto
  1204. 0.82381 0.61803 lineto
  1205. stroke
  1206. grestore
  1207. gsave
  1208. 0.001 setlinewidth
  1209. 0.8619 0.61428 moveto
  1210. 0.8619 0.61803 lineto
  1211. stroke
  1212. grestore
  1213. gsave
  1214. 0.001 setlinewidth
  1215. 0.9 0.61428 moveto
  1216. 0.9 0.61803 lineto
  1217. stroke
  1218. grestore
  1219. gsave
  1220. 0.001 setlinewidth
  1221. 0.9381 0.61428 moveto
  1222. 0.9381 0.61803 lineto
  1223. stroke
  1224. grestore
  1225. gsave
  1226. 0.002 setlinewidth
  1227. 0 0.61803 moveto
  1228. 1 0.61803 lineto
  1229. stroke
  1230. grestore
  1231. gsave
  1232. /Helvetica-Bold findfont 12 scalefont setfont
  1233. [(Solution to x''\(t\) = F\(t\)/m)] 0.5 0.61803 0 -2 Mshowa
  1234. grestore
  1235. gsave
  1236. 0.002 setlinewidth
  1237. 0.99375 0.01472 moveto
  1238. 1 0.01472 lineto
  1239. stroke
  1240. grestore
  1241. gsave
  1242. 0.002 setlinewidth
  1243. 0.99375 0.10668 moveto
  1244. 1 0.10668 lineto
  1245. stroke
  1246. grestore
  1247. gsave
  1248. 0.002 setlinewidth
  1249. 0.99375 0.19865 moveto
  1250. 1 0.19865 lineto
  1251. stroke
  1252. grestore
  1253. gsave
  1254. 0.002 setlinewidth
  1255. 0.99375 0.29062 moveto
  1256. 1 0.29062 lineto
  1257. stroke
  1258. grestore
  1259. gsave
  1260. 0.002 setlinewidth
  1261. 0.99375 0.38259 moveto
  1262. 1 0.38259 lineto
  1263. stroke
  1264. grestore
  1265. gsave
  1266. 0.002 setlinewidth
  1267. 0.99375 0.47456 moveto
  1268. 1 0.47456 lineto
  1269. stroke
  1270. grestore
  1271. gsave
  1272. 0.002 setlinewidth
  1273. 0.99375 0.56653 moveto
  1274. 1 0.56653 lineto
  1275. stroke
  1276. grestore
  1277. gsave
  1278. 0.001 setlinewidth
  1279. 0.99625 0.03311 moveto
  1280. 1 0.03311 lineto
  1281. stroke
  1282. grestore
  1283. gsave
  1284. 0.001 setlinewidth
  1285. 0.99625 0.0515 moveto
  1286. 1 0.0515 lineto
  1287. stroke
  1288. grestore
  1289. gsave
  1290. 0.001 setlinewidth
  1291. 0.99625 0.0699 moveto
  1292. 1 0.0699 lineto
  1293. stroke
  1294. grestore
  1295. gsave
  1296. 0.001 setlinewidth
  1297. 0.99625 0.08829 moveto
  1298. 1 0.08829 lineto
  1299. stroke
  1300. grestore
  1301. gsave
  1302. 0.001 setlinewidth
  1303. 0.99625 0.12508 moveto
  1304. 1 0.12508 lineto
  1305. stroke
  1306. grestore
  1307. gsave
  1308. 0.001 setlinewidth
  1309. 0.99625 0.14347 moveto
  1310. 1 0.14347 lineto
  1311. stroke
  1312. grestore
  1313. gsave
  1314. 0.001 setlinewidth
  1315. 0.99625 0.16187 moveto
  1316. 1 0.16187 lineto
  1317. stroke
  1318. grestore
  1319. gsave
  1320. 0.001 setlinewidth
  1321. 0.99625 0.18026 moveto
  1322. 1 0.18026 lineto
  1323. stroke
  1324. grestore
  1325. gsave
  1326. 0.001 setlinewidth
  1327. 0.99625 0.21705 moveto
  1328. 1 0.21705 lineto
  1329. stroke
  1330. grestore
  1331. gsave
  1332. 0.001 setlinewidth
  1333. 0.99625 0.23544 moveto
  1334. 1 0.23544 lineto
  1335. stroke
  1336. grestore
  1337. gsave
  1338. 0.001 setlinewidth
  1339. 0.99625 0.25384 moveto
  1340. 1 0.25384 lineto
  1341. stroke
  1342. grestore
  1343. gsave
  1344. 0.001 setlinewidth
  1345. 0.99625 0.27223 moveto
  1346. 1 0.27223 lineto
  1347. stroke
  1348. grestore
  1349. gsave
  1350. 0.001 setlinewidth
  1351. 0.99625 0.30902 moveto
  1352. 1 0.30902 lineto
  1353. stroke
  1354. grestore
  1355. gsave
  1356. 0.001 setlinewidth
  1357. 0.99625 0.32741 moveto
  1358. 1 0.32741 lineto
  1359. stroke
  1360. grestore
  1361. gsave
  1362. 0.001 setlinewidth
  1363. 0.99625 0.3458 moveto
  1364. 1 0.3458 lineto
  1365. stroke
  1366. grestore
  1367. gsave
  1368. 0.001 setlinewidth
  1369. 0.99625 0.3642 moveto
  1370. 1 0.3642 lineto
  1371. stroke
  1372. grestore
  1373. gsave
  1374. 0.001 setlinewidth
  1375. 0.99625 0.40099 moveto
  1376. 1 0.40099 lineto
  1377. stroke
  1378. grestore
  1379. gsave
  1380. 0.001 setlinewidth
  1381. 0.99625 0.41938 moveto
  1382. 1 0.41938 lineto
  1383. stroke
  1384. grestore
  1385. gsave
  1386. 0.001 setlinewidth
  1387. 0.99625 0.43777 moveto
  1388. 1 0.43777 lineto
  1389. stroke
  1390. grestore
  1391. gsave
  1392. 0.001 setlinewidth
  1393. 0.99625 0.45617 moveto
  1394. 1 0.45617 lineto
  1395. stroke
  1396. grestore
  1397. gsave
  1398. 0.001 setlinewidth
  1399. 0.99625 0.49296 moveto
  1400. 1 0.49296 lineto
  1401. stroke
  1402. grestore
  1403. gsave
  1404. 0.001 setlinewidth
  1405. 0.99625 0.51135 moveto
  1406. 1 0.51135 lineto
  1407. stroke
  1408. grestore
  1409. gsave
  1410. 0.001 setlinewidth
  1411. 0.99625 0.52974 moveto
  1412. 1 0.52974 lineto
  1413. stroke
  1414. grestore
  1415. gsave
  1416. 0.001 setlinewidth
  1417. 0.99625 0.54814 moveto
  1418. 1 0.54814 lineto
  1419. stroke
  1420. grestore
  1421. gsave
  1422. 0.001 setlinewidth
  1423. 0.99625 0.58493 moveto
  1424. 1 0.58493 lineto
  1425. stroke
  1426. grestore
  1427. gsave
  1428. 0.001 setlinewidth
  1429. 0.99625 0.60332 moveto
  1430. 1 0.60332 lineto
  1431. stroke
  1432. grestore
  1433. gsave
  1434. 0.002 setlinewidth
  1435. 1 0 moveto
  1436. 1 0.61803 lineto
  1437. stroke
  1438. grestore
  1439. grestore
  1440. gsave
  1441. grestore
  1442. gsave
  1443. gsave
  1444. 0.01 setlinewidth
  1445. 0.02381 0.01472 moveto
  1446. 0.02505 0.01472 lineto
  1447. 0.02629 0.01472 lineto
  1448. 0.02753 0.01472 lineto
  1449. 0.02877 0.01473 lineto
  1450. 0.03001 0.01474 lineto
  1451. 0.03125 0.01475 lineto
  1452. 0.03373 0.01478 lineto
  1453. 0.03621 0.01481 lineto
  1454. 0.03869 0.01486 lineto
  1455. 0.04365 0.01497 lineto
  1456. 0.04861 0.01511 lineto
  1457. 0.05357 0.01529 lineto
  1458. 0.06349 0.01574 lineto
  1459. 0.07341 0.01631 lineto
  1460. 0.08333 0.01701 lineto
  1461. 0.10317 0.0188 lineto
  1462. 0.12302 0.0211 lineto
  1463. 0.14286 0.02391 lineto
  1464. 0.18254 0.03107 lineto
  1465. 0.22222 0.04026 lineto
  1466. 0.2619 0.0515 lineto
  1467. 0.30159 0.06479 lineto
  1468. 0.34127 0.08012 lineto
  1469. 0.38095 0.09749 lineto
  1470. 0.42063 0.1169 lineto
  1471. 0.46032 0.13836 lineto
  1472. 0.5 0.16187 lineto
  1473. 0.53968 0.18741 lineto
  1474. 0.57937 0.215 lineto
  1475. 0.61905 0.24464 lineto
  1476. 0.65873 0.27632 lineto
  1477. 0.69841 0.31004 lineto
  1478. 0.7381 0.3458 lineto
  1479. 0.77778 0.38361 lineto
  1480. 0.81746 0.42347 lineto
  1481. 0.85714 0.46536 lineto
  1482. 0.89683 0.50931 lineto
  1483. 0.93651 0.55529 lineto
  1484. 0.97619 0.60332 lineto
  1485. stroke
  1486. grestore
  1487. grestore
  1488. 0 0 moveto
  1489. 1 0 lineto
  1490. 1 0.61803 lineto
  1491. 0 0.61803 lineto
  1492. closepath
  1493. clip
  1494. newpath
  1495. % End of Graphics
  1496. MathPictureEnd
  1497. :[font = section; inactive; pageBreak; preserveAspect; startGroup; ]
  1498. The C Solution
  1499. :[font = text; inactive; preserveAspect; ]
  1500. To produce the C version of this function, we use "CForm."
  1501. :[font = input; preserveAspect; startGroup; ]
  1502. cfunction = StringJoin["y = ",ToString[CForm[solution]],";"]
  1503. :[font = output; output; inactive; preserveAspect; endGroup; ]
  1504. "y = 16.*Power(t,2);"
  1505. ;[o]
  1506. y = 16.*Power(t,2);
  1507. :[font = text; inactive; preserveAspect; ]
  1508. Using the package defined below, we will produce a complete C program containing this solution. The source file will be called "test.c" and it will contain one C function, called "main()", which will compute specific values of the solution to the above differential equation.
  1509. :[font = input; preserveAspect; ]
  1510. BuildCRoutine["test.c","main()",cfunction];
  1511. :[font = text; inactive; preserveAspect; ]
  1512. Mathematica allows you to escape (!) to the unix shell and execute some unix commands and it has a special escape (!!) for displaying files, so let's display the C routine we just defined.
  1513. :[font = input; preserveAspect; startGroup; ]
  1514. !!test.c
  1515. :[font = print; inactive; preserveAspect; endGroup; ]
  1516. #include <math.h>
  1517. #include <stdio.h>
  1518. #include "/LocalApps/Mathematica.app/Library/Mathematica/MathLink/Includes/mdefs.h"
  1519.  
  1520. main()
  1521. {
  1522.     double t;
  1523.     double y;
  1524.     
  1525.     for(t=0 ; t<=1 ; t+=.1)
  1526.     {
  1527.         y = 16.*Power(t,2);
  1528.         printf("t = %f , x(t) = %f\n",t,y);
  1529.     }
  1530. }
  1531. :[font = text; inactive; pageBreak; preserveAspect; ]
  1532. It is also easy to compile this C routine from within Mathematica.
  1533. :[font = input; preserveAspect; ]
  1534. CompileCRoutine["test.c","test.x"];
  1535. :[font = text; inactive; preserveAspect; ]
  1536. We can even run the new routine from Mathematica and observe the output.
  1537. :[font = input; preserveAspect; startGroup; ]
  1538. RunCRoutine["test.x"]
  1539. :[font = print; inactive; preserveAspect; endGroup; ]
  1540. t = 0.000000 , x(t) = 0.000000
  1541. t = 0.100000 , x(t) = 0.160000
  1542. t = 0.200000 , x(t) = 0.640000
  1543. t = 0.300000 , x(t) = 1.440000
  1544. t = 0.400000 , x(t) = 2.560000
  1545. t = 0.500000 , x(t) = 4.000000
  1546. t = 0.600000 , x(t) = 5.760000
  1547. t = 0.700000 , x(t) = 7.840000
  1548. t = 0.800000 , x(t) = 10.240000
  1549. t = 0.900000 , x(t) = 12.960000
  1550. t = 1.000000 , x(t) = 16.000000
  1551. :[font = text; inactive; preserveAspect; endGroup; ]
  1552. Now, use your imagination!
  1553. :[font = section; inactive; preserveAspect; startGroup; ]
  1554. Implementation
  1555. :[font = input; initialization; preserveAspect; startGroup; ]
  1556. *)
  1557. Off[General::spell1]
  1558.  
  1559. SetDirectory["~/Programming/BillDavis/TeXDisplay"]
  1560.  
  1561. Install["texdisplay"]
  1562.  
  1563. W[line___String] := WriteString[file,line,"\n"]
  1564. Wt[line___String] := WriteString[file,"\t",line,"\n"]
  1565. Wtt[line___String] := WriteString[file,"\t\t",line,"\n"]
  1566.  
  1567. BuildCRoutine[filename_String,routinename_String,function_String] :=
  1568.  
  1569. Block[{file  = "",
  1570.        mdefs = "\"/LocalApps/Mathematica.app/Library/Mathematica/MathLink/Includes/mdefs.h\""},
  1571.     
  1572.       file = OpenWrite[filename];
  1573.       
  1574.      W["#include <math.h>"];
  1575.       W["#include <stdio.h>"];
  1576.       W["#include ",mdefs];
  1577.       W[];
  1578.       W[routinename];
  1579.       W["{"];
  1580.       Wt["double t;"];
  1581.       Wt["double y;"];
  1582.       Wt[];
  1583.       Wt["for(t=0 ; t<=1 ; t+=.1)"];
  1584.       Wt["{"];
  1585.       Wtt[function];
  1586.       Wtt["printf(\"t = %f , x(t) = %f\\n\",t,y);"];
  1587.       Wt["}"];
  1588.       W["}"];
  1589.       
  1590.       Close[file]
  1591. ]
  1592.          
  1593. CompileCRoutine[filename_String,executablename_String] := 
  1594.         
  1595.         Run[StringJoin["cc ",filename," -o ",executablename]];
  1596.         
  1597. RunCRoutine[programname_String] := Run[programname]
  1598. (*
  1599. ;[s]
  1600. 3:0,0;399,1;410,2;1007,-1;
  1601. 3:1,10,8,Courier,1,12,0,0,0;1,10,8,Courier,2,12,0,0,0;1,10,8,Courier,1,12,0,0,0;
  1602. :[font = output; output; inactive; preserveAspect; ]
  1603. "/LocalUsers/Mezzino/Programming/BillDavis/TeXDisplay\
  1604.   "
  1605. ;[o]
  1606. /LocalUsers/Mezzino/Programming/BillDavis/TeXDisplay
  1607. :[font = output; output; inactive; preserveAspect; endGroup; endGroup; endGroup; endGroup; ]
  1608. LinkObject["texdisplay", 1, 1]
  1609. ;[o]
  1610. LinkObject[texdisplay, 1, 1]
  1611. ^*)