I want to plot region for z numbers that satisfy D<10^-4.
1 view (last 30 days)
Show older comments
How do I plot the region showing z=x+iy values that make the difference between a polynomial and an exponential function less than 10^-4?
For example;
syms z
[x,y]=meshgrid(-6:.1:2,-6:.1:6);
z=x+1i*y;
R = - 0.0000000000000042786173933199698996786792332228*z.^16 + 0.000000000000093679201874795131075154866430805*z.^15 ...
- 0.0000000000018102462775238750488561630646573*z.^14 + 0.000000000070607888835529581094992975687635*z.^13 ...
- 0.00000000047430380749604348847250198255397*z.^12 + 0.0000000060302178555555310479780219749732*z.^11 ...
- 0.00000014850754796722791834393401507891*z.^10 - 0.0000011975088237244406931082370289037*z.^9 ...
- 0.00000486020688657407415163842024264*z.^8 + 0.000027465820312500018146735337769556*z.^7 ...
+ 0.0010023328993055556912781216101668*z.^6 + 0.0080891927083333337897961540664676*z.^5 ...
+ 0.041666666666666667576168711195926*z.^4 + 0.16666666666666666756898545265065*z.^3 + 0.5*z.^2 + 1.0*z + 1.0;
T = exp(z);
D = R-T;
I want to plot region for z numbers that satisfy D<10^-4.
How can I do that? I would be appreciate if you help.
0 Comments
Accepted Answer
Torsten
on 8 Jun 2022
Edited: Torsten
on 8 Jun 2022
R1 = @(x,y)- 0.0000000000000042786173933199698996786792332228*(x+1i*y).^16 + 0.000000000000093679201874795131075154866430805*(x+1i*y).^15 ...
- 0.0000000000018102462775238750488561630646573*(x+1i*y).^14 + 0.000000000070607888835529581094992975687635*(x+1i*y).^13 ...
- 0.00000000047430380749604348847250198255397*(x+1i*y).^12 + 0.0000000060302178555555310479780219749732*(x+1i*y).^11 ...
- 0.00000014850754796722791834393401507891*(x+1i*y).^10 - 0.0000011975088237244406931082370289037*(x+1i*y).^9 ...
- 0.00000486020688657407415163842024264*(x+1i*y).^8 + 0.000027465820312500018146735337769556*(x+1i*y).^7 ...
+ 0.0010023328993055556912781216101668*(x+1i*y).^6 + 0.0080891927083333337897961540664676*(x+1i*y).^5 ...
+ 0.041666666666666667576168711195926*(x+1i*y).^4 + 0.16666666666666666756898545265065*(x+1i*y).^3 + 0.5*(x+1i*y).^2 + 1.0*(x+1i*y) + 1.0;
R2 = @(x,y) sum((x+1i*y).^(0:16)./factorial(0:16));
T = @(x,y) exp(x+1i*y);
fun1 = @(x,y)norm(R1(x,y)-T(x,y))-1e-4;
fun2 = @(x,y)norm(R2(x,y)-T(x,y))-1e-4;
fimplicit(fun1)
hold on
fimplicit(fun2)
4 Comments
More Answers (0)
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!