-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathQNMsMorrisThorneWH-1.mw
211 lines (211 loc) · 26.9 KB
/
QNMsMorrisThorneWH-1.mw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<?xml version="1.0" encoding="UTF-8"?>
<Worksheet>
<Version major="2022" minor="2"/>
<Label-Scheme value="2" prefix=""/>
<View-Properties presentation="true" autoexpanding_sections="true" UserProfileName="Maple Default Profile" NumericFormat-ApplyInteger="true" NumericFormat-ApplyRational="true" NumericFormat-ApplyExponent="false" editable="true">
</View-Properties>
<MapleNet-Properties prettyprint="3" warnlevel="3" compactdisplay="false" preplot="" helpbrowser="standard" displayprecision="-1" echo="1" scientificx="true" unitattributes=""fontweight" = "bold"" imaginaryunit="I" longdelim="true" elisiontermsthreshold="10000" elisiondigitsafter="100" elisiondigitsbefore="100" plotdevice="inline" errorbreak="1" plotoptions="" plotdriver="opengl" quiet="false" elisiontermsbefore="100" elisiontermsafter="100" historytimestamp="false" screenwidth="79" indentamount="4" plotoutput="terminal" screenpixelheight="1200" rtablesize="[10, 10]" useclientjvm="true" format="document" labelwidth="20" postplot="" typesetting="extended" ansi="false" ansicolor="[]" elisiondigitsthreshold="10000" showassumed="1" ansilprint="false" trailingsemicolon="true" errorcursor="false" labelling="true" screenheight="25" prompt="> " verboseproc="1" latexwidth="8.0" ShowLabels="true"/>
<Styles>
<Font name="Heading 1" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Warning" background="[255,255,255]" bold="false" executable="false" family="Courier New" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Output" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 4" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Line Printed Output" background="[255,255,255]" bold="false" executable="false" family="Courier New" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 2" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="16" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Output" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Inert Output" background="[255,255,255]" bold="false" executable="true" family="Times New Roman" foreground="[144,144,144]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 3" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="14" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Diagnostic" background="[255,255,255]" bold="false" executable="false" family="Courier New" foreground="[40,120,40]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 1" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Input" background="[255,255,255]" bold="true" executable="true" family="Courier New" foreground="[120,0,14]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Text Output" background="[255,255,255]" bold="false" executable="false" family="Courier New" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 2" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 3" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 4" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 5" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Annotation Title" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Header and Footer" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="10" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="HyperlinkError" background="[255,255,255]" bold="false" executable="false" family="Courier New" foreground="[255,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="Atomic Variable" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[175,0,175]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="HyperlinkWarning" background="[255,255,255]" bold="false" executable="false" family="Courier New" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="Dictionary Hyperlink" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[147,0,15]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="2D Math" background="[255,255,255]" bold="false" executable="true" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Bullet Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Plot" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Annotation Text" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="List Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Dash Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Input" background="[255,255,255]" bold="false" executable="true" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Error" background="[255,255,255]" bold="false" executable="false" family="Courier New" foreground="[255,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Title" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Text" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Normal" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Caption Reference" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Code" background="[255,255,255]" bold="false" executable="false" family="Courier New" foreground="[255,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Input Placeholder" background="[255,255,255]" bold="true" executable="true" family="Courier New" foreground="[200,0,200]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="true"/>
<Font name="Equation Label" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Author" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Hyperlink" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,128,128]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="Caption Text" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Layout name="Heading 1" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="4" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Warning" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 4" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Line Printed Output" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="any" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 2" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="2" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Maple Output" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.3" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 3" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Diagnostic" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="any" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 1" alignment="left" bullet="numeric" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix="."/>
<Layout name="Text Output" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="newline" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 2" alignment="left" bullet="alphabetic" firstindent="0" leftmargin="36" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix="."/>
<Layout name="Ordered List 3" alignment="left" bullet="roman" firstindent="0" leftmargin="72" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix="."/>
<Layout name="Ordered List 4" alignment="left" bullet="ALPHABETIC" firstindent="0" leftmargin="108" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix="."/>
<Layout name="Ordered List 5" alignment="left" bullet="ROMAN" firstindent="0" leftmargin="144" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix="."/>
<Layout name="Annotation Title" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="12" spacebelow="12" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="HyperlinkError" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="HyperlinkWarning" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Bullet Item" alignment="left" bullet="dot" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Maple Plot" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="List Item" alignment="left" bullet="indent" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Dash Item" alignment="left" bullet="dash" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Error" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Title" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="12" spacebelow="12" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Normal" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Author" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="8" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Pencil-style name="Pencil 1" pen-color="[0,0,0]" pen-height="1.0" pen-width="1.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 2" pen-color="[0,0,255]" pen-height="1.0" pen-width="1.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 3" pen-color="[0,0,0]" pen-height="3.0" pen-width="3.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 4" pen-color="[0,0,255]" pen-height="3.0" pen-width="3.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 5" pen-color="[255,0,0]" pen-height="5.0" pen-width="5.0" pen-opacity="1.0"/>
<Highlighter-style name="Highlighter 5" pen-color="[255,255,0]" pen-height="48.0" pen-width="48.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 3" pen-color="[51,255,0]" pen-height="24.0" pen-width="24.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 4" pen-color="[0,255,255]" pen-height="32.0" pen-width="32.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 1" pen-color="[255,153,255]" pen-height="12.0" pen-width="8.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 2" pen-color="[255,204,0]" pen-height="14.0" pen-width="14.0" pen-opacity="0.8"/>
</Styles>
<Startup-Code startupcode=""/>
<Task-table>
<Task-category name="<default>"/>
</Task-table>
<Task/><Presentation-Block>
<Group view="code" labelreference="L2" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal"># The Morris-Thorne wormholes : computation of quasi-normal modes</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L3" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">restart: # Matrices assembling for Morris-Thorne wormholes quasi-normal modes computation</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L4" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">with(LinearAlgebra):</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L5" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">Digits := 200: # Number of significant digits we compute</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L6" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal"># Physical parameters:</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L114" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">L := 0: # angular momentum parameter value</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L8" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">s := 0: # spin parameter value (s = 0, 1, 2)</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L7" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">e := 1 - s^2: # self-explaining</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L14" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal"># Numerical parameters:</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L15" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">n := 200: # Number of Tchebyshev modes, the matrices will be of size n*n</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L19" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal"># Definition of final ODE coefficients:</Text-field>
</Input>
</Group>
<Group view="code" hide-input="false" labelreference="L21" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">L00 := y -> piecewise(y=-1, -Pi^2/16*L*(L+1), y=1, -Pi^2/16*L*(L+1), (y > -1) and (y < 1), -cos(1/2*Pi*y)^2*(L*(L+1) + e*cos(1/2*Pi*y)^2)/(-y^2 + 1)^2):</Text-field>
</Input>
</Group>
<Group view="code" hide-input="false" labelreference="L31" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">L01 := y -> piecewise(y=-1, 0, y=1, 0, (y > -1) and (y < 1), -2*cos(1/2*Pi*y)^2*sin(Pi*y)/(Pi*(-y^2 + 1)^2)):</Text-field>
</Input>
</Group>
<Group view="code" hide-input="false" labelreference="L32" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">L02 := y -> piecewise(y=-1, 0, y=1, 0, (y > -1) and (y < 1), 4*cos(1/2*Pi*y)^4/Pi^2/(-y^2 + 1)^2):</Text-field>
</Input>
</Group>
<Group view="code" hide-input="false" labelreference="L33" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">L10 := y -> piecewise(y=-1, 0, y=1, 0, (y > -1) and (y < 1), 4*cos(1/2*Pi*y)^4/(Pi*(-y^2 + 1)^2)):</Text-field>
</Input>
</Group>
<Group view="code" hide-input="false" labelreference="L34" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">L11 := y -> piecewise(y=-1, -Pi/4, y=1, Pi/4, (y > -1) and (y < 1), 4*cos(1/2*Pi*y)^2*(Pi*y + sin(Pi*y))/(Pi^2*(-y^2 + 1)^2)):</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L35" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">L12 := y -> 0:</Text-field>
</Input>
</Group>
<Group view="code" hide-input="false" labelreference="L36" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">L20 := y -> piecewise(y=-1, 0, y=1, 0, (y > -1) and (y < 1), (1 - (y + sin(Pi*y)/Pi)^2)/(-y^2 + 1)^2):</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L37" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">L21 := y -> 0:</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L38" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">L22 := y -> 0:</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L23" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">local j: F := y -> simplify(add(a[j]*ChebyshevT(j, y), j=0..n-1)):</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L24" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">M0 := Matrix(n): M1 := Matrix(n): M2 := Matrix(n):</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L39" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal"># Assembling the matrices:
for i from 1 to n do
xi := cos((2.0*i-1.0)*Pi/(2.0*n)); # Chebyshev roots collocation points
# xi := -cos(Pi*(i-1)/(n-1)); # [-1, 1] Chebyshev extrema collocation points
expr0 := evalf(L00(xi)*F(xi) + L01(xi)*subs(x=xi, diff(F(x),x)) + L02(xi)*subs(x=xi, diff(F(x),x$2))):
expr1 := evalf(L10(xi)*F(xi) + L11(xi)*subs(x=xi, diff(F(x),x)) + L12(xi)*subs(x=xi, diff(F(x),x$2))):
expr2 := evalf(L20(xi)*F(xi) + L21(xi)*subs(x=xi, diff(F(x),x)) + L22(xi)*subs(x=xi, diff(F(x),x$2))):
for j from 1 to n do
M0[i,j] := coeff(expr0, a[j-1]);
M1[i,j] := coeff(expr1, a[j-1]);
M2[i,j] := coeff(expr2, a[j-1]);
end do:
end do:</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L62" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal"># We export the data:</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L40" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">ExportMatrix("../data/M0_200.mat", M0, target=MATLAB, mode=ascii):</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L41" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">ExportMatrix("../data/M1_200.mat", M1, target=MATLAB, mode=ascii):</Text-field>
</Input>
</Group>
<Group view="code" labelreference="L42" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input><Text-field prompt="> " style="Maple Input" layout="Normal">ExportMatrix("../data/M2_200.mat", M2, target=MATLAB, mode=ascii):</Text-field>
</Input>
</Group></Presentation-Block>
</Worksheet>