-
Notifications
You must be signed in to change notification settings - Fork 1
/
ABM_equations_doc.html
188 lines (155 loc) · 11 KB
/
ABM_equations_doc.html
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
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--
This HTML was auto-generated from MATLAB code.
To make changes, update the MATLAB code and republish this document.
--><title>ABM_equations</title><meta name="generator" content="MATLAB 9.12"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2022-09-18"><meta name="DC.source" content="ABM_equations_doc.m"><style type="text/css">
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outine:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}
html { min-height:100%; margin-bottom:1px; }
html body { height:100%; margin:0px; font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#000; line-height:140%; background:#fff none; overflow-y:scroll; }
html body td { vertical-align:top; text-align:left; }
h1 { padding:0px; margin:0px 0px 25px; font-family:Arial, Helvetica, sans-serif; font-size:1.5em; color:#d55000; line-height:100%; font-weight:normal; }
h2 { padding:0px; margin:0px 0px 8px; font-family:Arial, Helvetica, sans-serif; font-size:1.2em; color:#000; font-weight:bold; line-height:140%; border-bottom:1px solid #d6d4d4; display:block; }
h3 { padding:0px; margin:0px 0px 5px; font-family:Arial, Helvetica, sans-serif; font-size:1.1em; color:#000; font-weight:bold; line-height:140%; }
a { color:#005fce; text-decoration:none; }
a:hover { color:#005fce; text-decoration:underline; }
a:visited { color:#004aa0; text-decoration:none; }
p { padding:0px; margin:0px 0px 20px; }
img { padding:0px; margin:0px 0px 20px; border:none; }
p img, pre img, tt img, li img, h1 img, h2 img { margin-bottom:0px; }
ul { padding:0px; margin:0px 0px 20px 23px; list-style:square; }
ul li { padding:0px; margin:0px 0px 7px 0px; }
ul li ul { padding:5px 0px 0px; margin:0px 0px 7px 23px; }
ul li ol li { list-style:decimal; }
ol { padding:0px; margin:0px 0px 20px 0px; list-style:decimal; }
ol li { padding:0px; margin:0px 0px 7px 23px; list-style-type:decimal; }
ol li ol { padding:5px 0px 0px; margin:0px 0px 7px 0px; }
ol li ol li { list-style-type:lower-alpha; }
ol li ul { padding-top:7px; }
ol li ul li { list-style:square; }
.content { font-size:1.2em; line-height:140%; padding: 20px; }
pre, code { font-size:12px; }
tt { font-size: 1.2em; }
pre { margin:0px 0px 20px; }
pre.codeinput { padding:10px; border:1px solid #d3d3d3; background:#f7f7f7; }
pre.codeoutput { padding:10px 11px; margin:0px 0px 20px; color:#4c4c4c; }
pre.error { color:red; }
@media print { pre.codeinput, pre.codeoutput { word-wrap:break-word; width:100%; } }
span.keyword { color:#0000FF }
span.comment { color:#228B22 }
span.string { color:#A020F0 }
span.untermstring { color:#B20000 }
span.syscmd { color:#B28C00 }
span.typesection { color:#A0522D }
.footer { width:auto; padding:10px 0px; margin:25px 0px 0px; border-top:1px dotted #878787; font-size:0.8em; line-height:140%; font-style:italic; color:#878787; text-align:left; float:none; }
.footer p { margin:0px; }
.footer a { color:#878787; }
.footer a:hover { color:#878787; text-decoration:underline; }
.footer a:visited { color:#878787; }
table th { padding:7px 5px; text-align:left; vertical-align:middle; border: 1px solid #d6d4d4; font-weight:bold; }
table td { padding:7px 5px; text-align:left; vertical-align:top; border:1px solid #d6d4d4; }
</style></head><body><div class="content"><h1><tt>ABM_equations</tt></h1><!--introduction--><p>mth-order Adams-Bashforth-Moulton equations.</p><p><a href="index.html">Back to IVP Solver Toolbox Contents</a>.</p><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#1">Syntax</a></li><li><a href="#2">Description</a></li><li><a href="#3">Input/Output Parameters</a></li><li><a href="#4">Example #1: 1st-order Adams-Bashforth-Moulton equations.</a></li><li><a href="#5">Example #2: 2nd-order Adams-Bashforth-Moulton equations.</a></li><li><a href="#6">Example #3: 3rd-order Adams-Bashforth-Moulton equations.</a></li><li><a href="#7">Example #4: 4th-order Adams-Bashforth-Moulton equations.</a></li><li><a href="#8">Example #5: 5th-order Adams-Bashforth-Moulton equations.</a></li><li><a href="#9">Example #6: 6th-order Adams-Bashforth-Moulton equations.</a></li><li><a href="#10">Example #7: 7th-order Adams-Bashforth-Moulton equations.</a></li><li><a href="#11">Example #8: 8th-order Adams-Bashforth-Moulton equations.</a></li><li><a href="#12">See also</a></li></ul></div><h2 id="1">Syntax</h2><pre class="language-matlab">ABM_equations(m)
</pre><h2 id="2">Description</h2><p><tt>ABM_equations(m)</tt> prints the mth-order Adams-Bashforth-Moulton predictor-corrector equations to the Command Window.</p><h2 id="3">Input/Output Parameters</h2><p>
<table border=1>
<tr>
<td></td>
<td style="text-align:center"><b>Variable</b></td>
<td style="text-align:center"><b>Symbol</b></td>
<td style="text-align:center"><b>Description</b></td>
<td style="text-align:center"><b>Format</b></td>
</tr>
<tr>
<td style="text-align:center"><b>Input</b></td>
<td style="text-align:center"><TT>m</TT></td>
<td style="text-align:center"><img src="https://latex.codecogs.com/svg.latex?\inline&space;m" title="m" /></td>
<td>order of Adams-Bashforth-Moulton method</td>
<td style="text-align:center">1×1<BR>double</td>
</tr>
</table>
</p><h2 id="4">Example #1: 1st-order Adams-Bashforth-Moulton equations.</h2><pre class="codeinput">ABM_equations(1);
</pre><pre class="codeoutput">1st-order Adams-Bashforth-Moulton method:
yp(n+1) = y(n) + h(f(n))
y(n+1) = y(n) + h(f(t(n+1),yp(n+1)))
</pre><h2 id="5">Example #2: 2nd-order Adams-Bashforth-Moulton equations.</h2><pre class="codeinput">ABM_equations(2);
</pre><pre class="codeoutput">2nd-order Adams-Bashforth-Moulton method:
yp(n+1) = y(n) + (h/2)(3f(n) - f(n-1))
y(n+1) = y(n) + (h/2)(f(t(n+1),yp(n+1)) + f(n))
</pre><h2 id="6">Example #3: 3rd-order Adams-Bashforth-Moulton equations.</h2><pre class="codeinput">ABM_equations(3);
</pre><pre class="codeoutput">3rd-order Adams-Bashforth-Moulton method:
yp(n+1) = y(n) + (h/12)(23f(n) - 16f(n-1) + 5f(n-2))
y(n+1) = y(n) + (h/12)(5f(t(n+1),yp(n+1)) + 8f(n) - f(n-1))
</pre><h2 id="7">Example #4: 4th-order Adams-Bashforth-Moulton equations.</h2><pre class="codeinput">ABM_equations(4);
</pre><pre class="codeoutput">4th-order Adams-Bashforth-Moulton method:
yp(n+1) = y(n) + (h/24)(55f(n) - 59f(n-1) + 37f(n-2) - 9f(n-3))
y(n+1) = y(n) + (h/24)(9f(t(n+1),yp(n+1)) + 19f(n) - 5f(n-1) + f(n-2))
</pre><h2 id="8">Example #5: 5th-order Adams-Bashforth-Moulton equations.</h2><pre class="codeinput">ABM_equations(5);
</pre><pre class="codeoutput">5th-order Adams-Bashforth-Moulton method:
yp(n+1) = y(n) + (h/720)(1901f(n) - 2774f(n-1) + 2616f(n-2) - 1274f(n-3) + 251f(n-4))
y(n+1) = y(n) + (h/720)(251f(t(n+1),yp(n+1)) + 646f(n) - 264f(n-1) + 106f(n-2) - 19f(n-3))
</pre><h2 id="9">Example #6: 6th-order Adams-Bashforth-Moulton equations.</h2><pre class="codeinput">ABM_equations(6);
</pre><pre class="codeoutput">6th-order Adams-Bashforth-Moulton method:
yp(n+1) = y(n) + (h/1440)(4277f(n) - 7923f(n-1) + 9982f(n-2) - 7298f(n-3) + 2877f(n-4) - 475f(n-5))
y(n+1) = y(n) + (h/1440)(475f(t(n+1),yp(n+1)) + 1427f(n) - 798f(n-1) + 482f(n-2) - 173f(n-3) + 27f(n-4))
</pre><h2 id="10">Example #7: 7th-order Adams-Bashforth-Moulton equations.</h2><pre class="codeinput">ABM_equations(7);
</pre><pre class="codeoutput">7th-order Adams-Bashforth-Moulton method:
yp(n+1) = y(n) + (h/60480)(198721f(n) - 447288f(n-1) + 705549f(n-2) - 688256f(n-3) + 407139f(n-4) - 134472f(n-5) + 19087f(n-6))
y(n+1) = y(n) + (h/60480)(19087f(t(n+1),yp(n+1)) + 65112f(n) - 46461f(n-1) + 37504f(n-2) - 20211f(n-3) + 6312f(n-4) - 863f(n-5))
</pre><h2 id="11">Example #8: 8th-order Adams-Bashforth-Moulton equations.</h2><pre class="codeinput">ABM_equations(8);
</pre><pre class="codeoutput">8th-order Adams-Bashforth-Moulton method:
yp(n+1) = y(n) + (h/120960)(434241f(n) - 1152169f(n-1) + 2183877f(n-2) - 2664477f(n-3) + 2102243f(n-4) - 1041723f(n-5) + 295767f(n-6) - 36799f(n-7))
y(n+1) = y(n) + (h/120960)(36799f(t(n+1),yp(n+1)) + 139849f(n) - 121797f(n-1) + 123133f(n-2) - 88547f(n-3) + 41499f(n-4) - 11351f(n-5) + 1375f(n-6))
</pre><h2 id="12">See also</h2><p><a href="AB_coefficients_doc.html"><tt>AB_coefficients</tt></a> | <a href="AM_coefficients_doc.html"><tt>AM_coefficients</tt></a> | <a href="ABM_equations_doc.html"><tt>AB_predictor</tt></a> | <a href="AM_corrector_doc.html"><tt>AM_corrector</tt></a></p><p class="footer"><br><a href="https://www.mathworks.com/products/matlab/">Published with MATLAB® R2022a</a><br></p></div><!--
##### SOURCE BEGIN #####
%% |ABM_equations|
% mth-order Adams-Bashforth-Moulton equations.
%
% <index.html Back to IVP Solver Toolbox Contents>.
%% Syntax
% ABM_equations(m)
%% Description
% |ABM_equations(m)| prints the mth-order Adams-Bashforth-Moulton
% predictor-corrector equations to the Command Window.
%% Input/Output Parameters
% <html>
% <table border=1>
% <tr>
% <td></td>
% <td style="text-align:center"><b>Variable</b></td>
% <td style="text-align:center"><b>Symbol</b></td>
% <td style="text-align:center"><b>Description</b></td>
% <td style="text-align:center"><b>Format</b></td>
% </tr>
% <tr>
% <td style="text-align:center"><b>Input</b></td>
% <td style="text-align:center"><TT>m</TT></td>
% <td style="text-align:center"><img src="https://latex.codecogs.com/svg.latex?\inline&space;m" title="m" /></td>
% <td>order of Adams-Bashforth-Moulton method</td>
% <td style="text-align:center">1×1<BR>double</td>
% </tr>
% </table>
% </html>
%% Example #1: 1st-order Adams-Bashforth-Moulton equations.
ABM_equations(1);
%% Example #2: 2nd-order Adams-Bashforth-Moulton equations.
ABM_equations(2);
%% Example #3: 3rd-order Adams-Bashforth-Moulton equations.
ABM_equations(3);
%% Example #4: 4th-order Adams-Bashforth-Moulton equations.
ABM_equations(4);
%% Example #5: 5th-order Adams-Bashforth-Moulton equations.
ABM_equations(5);
%% Example #6: 6th-order Adams-Bashforth-Moulton equations.
ABM_equations(6);
%% Example #7: 7th-order Adams-Bashforth-Moulton equations.
ABM_equations(7);
%% Example #8: 8th-order Adams-Bashforth-Moulton equations.
ABM_equations(8);
%% See also
% <AB_coefficients_doc.html |AB_coefficients|> |
% <AM_coefficients_doc.html |AM_coefficients|> |
% <ABM_equations_doc.html |AB_predictor|> |
% <AM_corrector_doc.html |AM_corrector|>
##### SOURCE END #####
--></body></html>