Maple 2020 Questions and Posts

These are Posts and Questions associated with the product, Maple 2020

I have a table that includes the numeric and exact solution of a complex PDE.

I want to calculate error between exact and numeric solution. 
Question 1: Which type of error is mostly used for complex solutions? Absolute error or relative error ,ecludian norm error etc.

Question 2: How to calculate absolute error in complex solutions?

 |abs(Exact_Solution)-abs(Numeric_Solution)|

or

|abs(Exact_Solution-Numeric_Solution)|

 

restart:
interface(rtablesize=19):
Table_1:=Matrix(19,4,{(1, 1) = x, (1, 2) = t, (1, 3) = Exact_Solution, (1, 4) = 
Numeric_Solution, (2, 3) = .58480350959087385609+1.0129093910559867400*I, (2, 4
) = .58480354764257321311+1.0129094569634633407*I, (3, 2) = .2, (3, 3) = .58507\
763625784549559+1.0133841923708911330*I, (3, 4) = .58507767430954485264+1.01338\
42582783677337*I, (4, 2) = .4, (4, 3) = .58590001649935378049+1.014808596732324\
2462*I, (4, 4) = .58590005455105313755+1.0148086626398008469*I, (5, 2) = .6, (5
, 3) = .58727066619506620449+1.0171826316446769860*I, (5, 4) = .587270690527719\
69197+1.0171826737900691093*I, (6, 2) = .8, (6, 3) = .58918956627727806829+1.02\
05062640817160297*I, (6, 4) = .58918959060993155574+1.0205063062271081530*I, (7
, 2) = 1.0, (7, 3) = .59165666981620797589+1.0247794127586756112*I, (7, 4) = .5\
9165677643905044333+1.0247795974348560123*I, (8, 1) = .5, (8, 3) = .59165805893\
555155139+1.0247818187839564608*I, (8, 4) = .59165677643905044333+1.02477959743\
48560123*I, (9, 1) = .5, (9, 2) = .2, (9, 3) = .58919046685310110177+1.02050782\
39247975919*I, (9, 4) = .58918959060993155574+1.0205063062271081530*I, (10, 1)
= .5, (10, 2) = .4, (10, 3) = .58727131671750391922+1.0171837583825905714*I, (
10, 4) = .58727069052771969197+1.0171826737900691093*I, (11, 1) = .5, (11, 2) =
.6, (11, 3) = .58590207620818846348+1.0148121642526747156*I, (11, 4) = .5859000\
5455105313755+1.0148086626398008469*I, (12, 1) = .5, (12, 2) = .8, (12, 3) = .5\
8507958971290229630+1.0133875758542998141*I, (12, 4) = .58507767430954485264+1.\
0133842582783677337*I, (13, 1) = .5, (13, 2) = 1.0, (13, 3) = .5848057178847424\
9287+1.0129132159331652617*I, (13, 4) = .58480354764257321311+1.012909456963463\
3407*I, (14, 1) = 1.0, (14, 3) = .61222010009837745680+1.0603963187852935669*I,
(14, 4) = .61222010009837745677+1.0603963187852935669*I, (15, 1) = 1.0, (15, 2)
= .2, (15, 3) = .60700988526763399480+1.0513719619800970123*I, (15, 4) = .60700\
988526763399480+1.0513719619800970123*I, (16, 1) = 1.0, (16, 2) = .4, (16, 3) =
.60234868471511732616+1.0432985257988700194*I, (16, 4) = .60234868471511732617+
1.0432985257988700194*I, (17, 1) = 1.0, (17, 2) = .6, (17, 3) = .59823621894610\
415849+1.0361755261425513984*I, (17, 4) = .59823621894610415846+1.0361755261425\
513983*I, (18, 1) = 1.0, (18, 2) = .8, (18, 3) = .59467229263079952050+1.030002\
6246900120270*I, (18, 4) = .59467229263079952054+1.0300026246900120270*I, (19,
1) = 1.0, (19, 2) = 1.0, (19, 3) = .59165677643905044330+1.0247795974348560123*
I, (19, 4) = .59165677643905044333+1.0247795974348560123*I},datatype = anything
,storage = rectangular,order = Fortran_order,shape = [])

 

Hi again. I have been stuck on this for almost 3 hours by now, and i have ran out of ideas..

I am working on a proof called dandelin spheres, which proves you can get an ellipse by cutting a cone with a plane.

I have found the right equation for both semi circles, the line (cone) and the plane.

I have defined the spheres as semi circles, and the cone as a line, which i am plotting by using the surface of revolution command.

The problem lies within the fact, that i cannot use the intersectplot command with surface of revolution, and i need the plot to show the intersection between the plane and cone. 

The following shapes are defined:

cone line - f := x -> 0.5*x;
small sphere - g := x -> sqrt(0.8944271908^2 - (x - 2)^2)

bigger sphere - h := x -> sqrt(3.354101965^2 - (x - 7.5)^2)

plane - m(x, 0) := 1.216350358*x - 3.841106394

with the following command i recieve this output, which i nice, but i am missing the final part, the ellipse.

 

I hope someone can help a desperate student :)

- Oscar


Dear all,
I want to create a superscripted and subscripted variable in 1-D math. I know that I can establish a subscripted variable by using double “_”, for example, the execution of the following command causes assignment 2 to u__b, in which b is the subscript of u.
u__b:=2;
However, I don’t know any way to create either a superscripted variable or a variable having both the subscript and superscript in 1-D math.
Can anyone help me?
 Best wishes

Hi

I have crreated a transfer function of a rather complex system using TransferFunction() and recived a transfercundtion of a rather high order (n=10). However due to the kinematics of the model I know that is is posible to expres as an second order transfer function.

So I have been locking around Maple for a function that can help me reduce or approwqimate the transfer function as a sencond order but I have not found anything.

Is there a way to reduce/approximate an n order transfer function to a second order transfer function?

Mvh

Eric Ragnarsson

 

            We announce the release of a new book, of title Fourier Transforms for Chemistry, which is in the form of a Maple worksheet.  This book is freely available through Maple Application Centre, either as a Maple worksheet with no output from commands or as a .pdf file with all output and plots.

            This interactive electronic book in the form of a Maple worksheet comprises six chapters containing Maple commands, plus an overview 0 as an introduction.  The chapters have content as follows.

  -   1    continuous Fourier transformation

  -   2    electron diffraction of a gaseous sample

  -   3    xray diffraction of a crystal and a powder

  -   4    microwave spectrum of a gaseous sample

  -   5    infrared and Raman spectra of a liquid sample

  -   6    nuclear magnetic resonance of various samples

            This book will be useful in courses of physical chemistry or devoted to the determination of molecular structure by physical methods.  Some content, duly acknowledged, has been derived and adapted from other authors, with permission.

How I can show function w, on the 3d surface?

I want to show w (a function that shows mode shape or shows boundary condition) on the surface of the following plot3d?

This function changes the coordinates of some points and creates a different shape. this behavior occurs when geometry experiences some vibrational behavior.
Thanks

plot.mw

 

Hello, 

How can I solve this equation in Maple?

Please help me?

 

For the following equation, 

eqn:=1.35150599852371*10^10 = 2.45634141630387*10^7*x + 50.7216626470812*x^4 + 6.20132964743411*10^7*x^2 + 1.26328819483651*10^10 + 112528.172146835*x^3

using solve gives 4 real solutions

3.56789020177967, -3.99013603029896, -1017.86074450970, -1200.25966528805

Using RealDomain[solve] gives an error:

RealDomain[solve](eqn,x,allsolutions=true);
Error, (in assuming) when calling 'RootOf'. Received: 'the input range -1200.259665 .. -1200.259665 is invalid'

This is partly a bug alert, but any insight would be appreciated.



 

 I am new to Maple.  I will appreciate any assistance with a Maple iterative procedure to find the value of s at a given temperature for F(x,r,s, T) = 0 with all other variables fixed.  F is a complicated function.  

 

Is possible to operate Grid Computing Toolbox together with Maple on one local multicore machine?

If yes, what is the proper instalation/configuration procedure on Windows or Linux?

I want to get data from 2D plots and 3Dplots and want to export to Excel or Matlab.

 

For  2D plots, the following code works. The data can be exported to Excel. No problem.

restart: 

P1:=plot(sin(x));
data1:=op([1,1],P1); 

ExcelTools:-Export(data1, "C:/Users/student/Desktop/XLdat.csv", "Sheet1", "A1");
ExportMatrix("C:/Users/student/Desktop/XLdat.csv", data1); 

 

1. But the following code doesn' t work for exporting the data to Matlab. Why?

restart: P1:=plot(sin(x));
dataMat:=plottools:-getdata(P1);
dataMat2:=convert(dataMat,Matrix):
ExportMatrix( "test.mat",dataMat2, target=Matlab);

 

 

 2. How to write a code in order to get data from the 3D plot and to export to Excel or Matlab?

For example;

restart:
z=sin(x)*cos(y);
P2:=plot3d(z);

 

 

Maple 2020.2

Hello

I am trying to use Grid:-Seq to speed up some calculations.  To this end, I wrote the following procedure:

fun:=proc(model1::list,model2::list,vars::list,conds::set,tlim::numeric)
description "This function returns models with matching structures":
local ans1,ans2,res:=NULL:
if evalb(expand(model1)<>expand(model2)) then
     (ans1,ans2):=UtilsIORelation:-findMatchingStructures(subs(conds,model1),subs(conds,model2),vars,tlim):
     if nops(ans1) > 1 then
        res:=model1:
     end if:
end if:
return(res):
end proc:

I checked if the procedure works by issuing the following command

 

aux:=[seq](fun(modelX[i],model,vars,conds,2),i=1..nops(modelX)):

and it did work. The result is what I needed. 

But when I try it using Grid:-Seq instead of seq, I got the following error message:

infolevel[Grid:-Seq]:=3:
Grid:-Set(fun,findMatchingStructures,'model','vars','conds');
aux:=[Grid:-Seq](fun(modelX[i],model,vars,conds,2),i=1..nops(modelX)):

 

Error, (in fun) findMatchingStructures is not a command in the UtilsIORelation package.

 

What am I missing?   

Many thanks

 

 

 

How I can solve following differential equations.?

I want to plot phase diagrams versus time.

diff(xi[i](t), t) versts t (i=1,2,3,4,5,6)

66.mw

 

 

Hello.

I am currently working on a geometric proof, that cutting a cone can give you an ellipse. I have chosen the 'Dandelin spheres' proof, but i am having trouble plotting a hollow cone containing two solid spheres of different sizes. 

I thought i could maybe define each function, and then just display th surface area of the revolution of the cone, and the volume of revolution of the spheres in the same plotting table. However, this has proven more difficult than i thought.

f(x):=0.5*x

g(x):=sqrt(0.81-(x-2)^2)

h(x):=sqrt(3.57^2-(x-8)^2)

display([VolumeOfRevolution(f(x), x = 0 .. 10, output = plot, scaling = constrained), VolumeOfRevolution(g(x), x = 0 .. 10, output = plot, scaling = constrained), VolumeOfRevolution(h(x), x = 0 .. 10, output = plot, scaling = constrained)])

 

(I am aware that i have plotted the cone function (f(x), straight line) as volume and not surface area of revolution)
 

This does not give me one combined plot, but 3 seperate:(

I hope someone has the time to help!
Thank you

 

Why is a row of a matrix has type Matrix, but a column of a Matrix has type Vector (column vector)

I expected a row of a matrix to also be a Vector (row vector).

restart;
A:=Matrix([[1,2],[3,4]]);
A(1,..);
whattype(%);

A(..,1);
whattype(%);

This might be by design or documented somewhere. But I find it not consistent.  Either both results should be Matrices, or both should be Vectors (the more logical way).

 

Maple 2020.2 on windows 10.

First 15 16 17 18 19 20 21 Last Page 17 of 55