Alec Mihailovs

Dr. Aleksandrs Mihailovs

4495 Reputation

21 Badges

20 years, 339 days
Mihailovs, Inc.
Owner, President, and CEO
Tyngsboro, Massachusetts, United States

Social Networks and Content at Maplesoft.com

Maple Application Center

I received my Ph.D. from the University of Pennsylvania in 1998 and I have been teaching since then at SUNY Oneonta for 1 year, at Shepherd University for 5 years, at Tennessee Tech for 2 years, at Lane College for 1 year, and this year I taught at the University of Massachusetts Lowell. My research interests include Representation Theory and Combinatorics.

MaplePrimes Activity


These are replies submitted by Alec Mihailovs

What variables? Post the result that you would like to get and I'll show how to get it. __________ Alec Mihailovs http://mihailovs.com/Alec/
Congratulations! __________ Alec Mihailovs http://mihailovs.com/Alec/
Congratulations! __________ Alec Mihailovs http://mihailovs.com/Alec/
It is often the best start. As I just added to the previous post, fsolve can be used to find more precise values. __________ Alec Mihailovs http://mihailovs.com/Alec/
It is often the best start. As I just added to the previous post, fsolve can be used to find more precise values. __________ Alec Mihailovs http://mihailovs.com/Alec/
You can either change assignments a:=m; b:=n; at the beginning to m:=a; n:=b; and add m and n to the list of local variables, or (better) get rid of these assignments and replace m and n in the print commands close to the end with a and b correspondingly. __________ Alec Mihailovs http://mihailovs.com/Alec/
You can either change assignments a:=m; b:=n; at the beginning to m:=a; n:=b; and add m and n to the list of local variables, or (better) get rid of these assignments and replace m and n in the print commands close to the end with a and b correspondingly. __________ Alec Mihailovs http://mihailovs.com/Alec/
What textbook are you using? When I taught Numerical Analysis, I used Numerical Methods by Faires and Burden. I even corrected some of Maple programs accompanying it, see Errata. As far as I recall, that was a decent text. __________ Alec Mihailovs http://mihailovs.com/Alec/
What textbook are you using? When I taught Numerical Analysis, I used Numerical Methods by Faires and Burden. I even corrected some of Maple programs accompanying it, see Errata. As far as I recall, that was a decent text. __________ Alec Mihailovs http://mihailovs.com/Alec/
How about that,
g:=unapply(CurveFitting:-PolynomialInterpolation([2,3,4,5],[-7,3.2,4.1,10.45],x),x):
(g(2.5+0.01)-g(2.5-0.01))/0.02;

                             9.585660000

g:=unapply(CurveFitting:-Spline([2,3,4,5],[-7,3.2,4.1,10.45],x),x):
(g(2.5+0.01)-g(2.5-0.01))/0.02;

                             10.91054916
__________ Alec Mihailovs http://mihailovs.com/Alec/
How about that,
g:=unapply(CurveFitting:-PolynomialInterpolation([2,3,4,5],[-7,3.2,4.1,10.45],x),x):
(g(2.5+0.01)-g(2.5-0.01))/0.02;

                             9.585660000

g:=unapply(CurveFitting:-Spline([2,3,4,5],[-7,3.2,4.1,10.45],x),x):
(g(2.5+0.01)-g(2.5-0.01))/0.02;

                             10.91054916
__________ Alec Mihailovs http://mihailovs.com/Alec/
The values that you found, are the values of the function, not of the derivative. For the derivative you should use the central difference formula, (g(2,51)-g(2.49))/0.02 __________ Alec Mihailovs http://mihailovs.com/Alec/
The values that you found, are the values of the function, not of the derivative. For the derivative you should use the central difference formula, (g(2,51)-g(2.49))/0.02 __________ Alec Mihailovs http://mihailovs.com/Alec/
It's pretty close,
g := x -> (2*x^2+7)/x:
h := 0.01:
x := 1:
yaytwo := ((g(x+h) - 2*g(x) + g(x-h))/h^2);

                        yaytwo := 14.00140000

(D@@2)(g)(1);

                                  14
I see that you edited your post :) Anyway, it is the second derivative, not the third. The third derivative would be either
yaythree := (g(x+3*h/2) - 3*g(x+h/2) + 3*g(x-h/2)-g(x-3*h/2))/h^3;

                       yaythree := -42.01500000
or
anotheryaythree:=4*(g(x+h)-2*g(x+h/2)+2*g(x-h/2)-g(x-h))/h^3;

                   anotheryaythree := -42.00800000

(D@@3)(g)(1);

                                 -42
Anotheryaythree looks better, but that depends on the choice of h,
anotheryaythree1:=(g(x+2*h)-2*g(x+h)+2*g(x-h)-g(x-2*h))/2/h^3;

                   anotheryaythree1 := -42.02250000
__________ Alec Mihailovs http://mihailovs.com/Alec/
It's pretty close,
g := x -> (2*x^2+7)/x:
h := 0.01:
x := 1:
yaytwo := ((g(x+h) - 2*g(x) + g(x-h))/h^2);

                        yaytwo := 14.00140000

(D@@2)(g)(1);

                                  14
I see that you edited your post :) Anyway, it is the second derivative, not the third. The third derivative would be either
yaythree := (g(x+3*h/2) - 3*g(x+h/2) + 3*g(x-h/2)-g(x-3*h/2))/h^3;

                       yaythree := -42.01500000
or
anotheryaythree:=4*(g(x+h)-2*g(x+h/2)+2*g(x-h/2)-g(x-h))/h^3;

                   anotheryaythree := -42.00800000

(D@@3)(g)(1);

                                 -42
Anotheryaythree looks better, but that depends on the choice of h,
anotheryaythree1:=(g(x+2*h)-2*g(x+h)+2*g(x-h)-g(x-2*h))/2/h^3;

                   anotheryaythree1 := -42.02250000
__________ Alec Mihailovs http://mihailovs.com/Alec/
First 151 152 153 154 155 156 157 Last Page 153 of 180