Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi,

I have written a module M which contains some procedures P1, P2, ...
This module contains the statement option package.

In a separate worksheet I type the command L := with(M) to load this module and stack in the list L the names of all the procedures M contains.
I would like now to use showstat to display the content of all these procedures..

I thus typed:
for p in L do  showstat(p) end do;

I got an error saying that showstat expects a name as argument.
In the command above p is not a name but a symbol.

Is there a possibility to "showstat" all the procedures M contains ?

Motivation:I'd like to count the number of command lines in module M (showstat removes the lines of comments) ... maybe there exist an other way than using showstat ?


Thanks in advance

from help, it says about option of 'spacestep'=numeric to pdsolve numerical solver the following

Specifies the spacing of the spatial points on the discrete mesh on which the solution 
is computed, and defaults to 1/20th of the spatial range of the problem, 
r-L, where L is the left boundary, and r is the right. Note: The spacing must 
be small enough that a sufficient number of points are in the spatial domain 
for the given method, boundary conditions, and spatial interpolation (see below). 
If the given value of spacestep does not fit into the input domain an integral 
number of times, the closest smaller step size that does is used. For problems 
using error estimates, or an adaptive approach, the total number of spatial 
points must be odd, so again, if this is not the case for the specified 
spacestep, then it is reduced to satisfy this requirement.

In this problem, the domain is [-1,1]. So the default is 1/20 of this which is 1/10.  Why is it when using spacestep smaller than 1/11, the animator generated from the solution does not work right?  i.e. playing the animate does not produce correct result as the case when using spacestep=1/11 or spacestep=1/10?   

When using spacestep=1/16 or 1/15 or 1/14 or 1/13 or 1/12, it all produce bad animation.  I do not see why that is. 

Any ideas?  Am I doing something wrong?
 

pde := diff(u(x,t),t$2)=diff(u(x,t),x$2):
bc  := u(-1,t)=u(1,t),D[1](u)(-1,t)=D[1](u)(1,t):
f:=x->piecewise(-1/2<x and x<0,x+1/2,0<x and x<1/2,1/2-x,true,0):
plot(f(x),x=-1..1):
ic  := u(x,0)=f(x),D[2](u)(x,0)=0:
sol:=pdsolve(pde,{bc,ic},u(x,t),numeric,time=t,range=-1..1,  timestep=1/16,spacestep=1/16)

_m1793827573184

sol:-animate(t=1,frames=50,title="time = %f");

sol:=pdsolve(pde,{bc,ic},u(x,t),numeric,time=t,range=-1..1,  timestep=1/16,spacestep=1/12):
sol:-animate(t=1,frames=50,title="time = %f");

sol:=pdsolve(pde,{bc,ic},u(x,t),numeric,time=t,range=-1..1,  timestep=1/16,spacestep=1/11):
sol:-animate(t=1,frames=50,title="time = %f");

 

 

Download solving_wave_pde_2.mw

 

 

When solving this 1D wave PDE numerically, if the range used is -Pi..Pi then I get this error

sol:-plot(t=0,numpoints=100);
Error, (in Vector) unable to store '-Pi' when datatype=float[8]

When trying to plot the solution. Changing the range to -1..1 the error goes away.

I would expect the numerical solver to handle these things automatically? 

Please see attached worksheet.   How to work around this if one wants to use range from -Pi..Pi?

 

#wave PDE with periodic BC.
restart;

pde := diff(u(x,t),t$2)=diff(u(x,t),x$2);
bc  := u(-Pi,t)=u(Pi,t),D[1](u)(-Pi,t)=D[1](u)(Pi,t);
f:=x->piecewise(-Pi/2<x and x<Pi/2,1,true,0);
plot(f(x),x=-Pi..Pi);
ic  := u(x,0)=f(x),D[2](u)(x,0)=0;
sol:=pdsolve(pde,{bc,ic},u(x,t),numeric,time=t,range=-Pi..Pi)

pde := diff(u(x, t), t, t) = diff(u(x, t), x, x)

bc := u(-Pi, t) = u(Pi, t), (D[1](u))(-Pi, t) = (D[1](u))(Pi, t)

f := proc (x) options operator, arrow; piecewise(-(1/2)*Pi < x and x < (1/2)*Pi, 1, true, 0) end proc

u(x, 0) = piecewise(-(1/2)*Pi < x and x < (1/2)*Pi, 1, 0), (D[2](u))(x, 0) = 0

_m1174810042944

sol:-plot(t=0,numpoints=100);

Error, (in Vector) unable to store '-Pi' when datatype=float[8]

pde := diff(u(x,t),t$2)=diff(u(x,t),x$2);
bc  := u(-1,t)=u(1,t),D[1](u)(-1,t)=D[1](u)(1,t);
f:=x->piecewise(-1/2<x and x<1/2,1,true,0);
plot(f(x),x=-1..1);
ic  := u(x,0)=f(x),D[2](u)(x,0)=0;
sol:=pdsolve(pde,{bc,ic},u(x,t),numeric,time=t,range=-1..1)

pde := diff(u(x, t), t, t) = diff(u(x, t), x, x)

bc := u(-1, t) = u(1, t), (D[1](u))(-1, t) = (D[1](u))(1, t)

f := proc (x) options operator, arrow; piecewise(-1/2 < x and x < 1/2, 1, true, 0) end proc

u(x, 0) = piecewise(-1/2 < x and x < 1/2, 1, 0), (D[2](u))(x, 0) = 0

_m1174805392512

sol:-plot(t=0,numpoints=100);

 


 

Download solving_wave_pde.mw

The problem is to find a100 for a sequence defined as follows.


https://snipboard.io/AdZKX5.jpg I tried the following command for a recursive sequence.
(I used 10 instead of 100 to test run it).

a||1:=1;
for n from 2 to 10 do a||n:=2*sum( a||i ,i=1..n)^2/(2*sum( a||i ,i=1..n)-1); od;

This approach did not work. It says "error recursive assignment"

Any ideas how to get a(100), also if its possible how to solve the recursive sequence explicitly.

I tried rsolve :

rsolve({ f(n)=(2*sum(f(i),i=1..n)^2/(2*sum(f(i),i=1..n)-1)),f(1)=1},f(n))
rsolve({ f(n)=(2*sum(f(i),i=1..n)^2/(2*sum(f(i),i=1..n)-1)),f(1)=1},f(n))

It just returned back the expression inertly.

 

Assume that x[i] with 1≤i≤n are binary numbers. Let I_[k] be a subset with k elements of the set {1,2,⋯,n}.

Now Consider the following binary linear functions

It is clear that to obtain f[j]'s we need to compute ∑k[j] XOR bitwise operator. But it is possible to get f[j]'s with less than ∑k[j] XOR.

Example: Let n=8 and m=7 and suppose that

It follows from (1) that we need to do 20 XOR bitwise operator to get f[j]'s with 1≤j≤7. But set

which results in  f[j]'s are computed with just 9 XOR.

It is useful to mention that the relation (1) can be represented by a 8x8 binary matrix in the form of M*X=F. 

Question: Is it possible to implement a procedure in Maple such that by applying the procedure we get  f[j]'s with the minimum number of XOR bitwise operator.

One solution for this question is the "parr algorithm" that is given in the following paper

https://ieeexplore.ieee.org/document/613165

The paar algorithm is defined by

My problem is that I couldn't implement the paar algorithm in Maple.

Thanks for any help

 

 

 

Maple is good with solving PDE's.

But one limitation is in handling periodic BC with the wave PDE in 1D.

Maple can solve the periodic BC in the diffusion PDE but not the wave PDE.

Could one expect/hope that future versions of Maple will be be able to do this? 

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 451 and is the same as the version installed in this computer, created 2019, October 20, 22:40 hours, found in the directory C:\Users\me\maple\toolbox\2019\Physics Updates\lib\`

#diffusion PDE with periodic BC. Maple can solve
restart;

pde := diff(u(x,t),t)=diff(u(x,t),x$2);
bc  := u(-Pi,t)=u(Pi,t),D[1](u)(-Pi,t)=D[1](u)(Pi,t);
ic  := u(x,0)=f(x);
pdsolve([pde,bc,ic],u(x,t))

diff(u(x, t), t) = diff(diff(u(x, t), x), x)

u(-Pi, t) = u(Pi, t), (D[1](u))(-Pi, t) = (D[1](u))(Pi, t)

u(x, 0) = f(x)

u(x, t) = (1/2)*(2*(Sum(exp(-n^2*t)*((Int(f(x)*sin(n*x), x = -Pi .. Pi))*sin(n*x)+(Int(f(x)*cos(n*x), x = -Pi .. Pi))*cos(n*x))/Pi, n = 1 .. infinity))*Pi+Int(f(x), x = -Pi .. Pi))/Pi

#wave PDE with periodic BC. Maple can not solve
restart;

pde := diff(u(x,t),t$2)=diff(u(x,t),x$2);
bc  := u(-Pi,t)=u(Pi,t),D[1](u)(-Pi,t)=D[1](u)(Pi,t);
ic  := u(x,0)=f(x),D[2](u)(x,0)=g(x);
pdsolve([pde,bc,ic],u(x,t))

diff(diff(u(x, t), t), t) = diff(diff(u(x, t), x), x)

u(-Pi, t) = u(Pi, t), (D[1](u))(-Pi, t) = (D[1](u))(Pi, t)

u(x, 0) = f(x), (D[2](u))(x, 0) = g(x)

 

 

Download solving_wave_pde.mw

 

Hi,

How can I extract the coefficients of uij in Eq.(3) to form a system of PDEs in F, P and Q?

 

coeff_of_DE.mw

Hello,

I'm trying to verify a computation using maple. But the simplification of Physics doesn't return the right value.

The computation is

I wrote the follow code


 

J[x]^2*J[z]^2+(J[x]*J[z]*J[x])*J[z]+J[x]*J[z]^2*J[x]+J[x]^2*J[z]*J[z]+(J[x]*J[z]*J[z])*J[x]+J[x]^2*J[z]^2 = 3*J[x]^2*J[z]^2+3*J[x]^2*J[z]^2+2*J[x]^2-3*J[y]^2+2*J[z]^2

``

restart; with(Physics)*Setup(noncommutativepre = J)

CommuRules := seq(op([%Commutator(J[j[1]], J[j[2]]) = I*J[j[3]]]), j = [[x, y, z], [y, z, x], [z, x, y]])

NULL

NULL

Setup(CommuRules)

[algebrarules = {%Commutator(J[x], J[y]) = I*J[z], %Commutator(J[y], J[z]) = I*J[x], %Commutator(J[z], J[x]) = I*J[y]}]

(1)

NULL

with(combinat)

np := numbperm([J[x], J[x], J[z], J[z]], 4)

6

(2)

``

``

L := permute([J[x], J[x], J[z], J[z]], 4)

[[J[x], J[x], J[z], J[z]], [J[x], J[z], J[x], J[z]], [J[x], J[z], J[z], J[x]], [J[z], J[x], J[x], J[z]], [J[z], J[x], J[z], J[x]], [J[z], J[z], J[x], J[x]]]

(3)

``

NULL

L2 := seq(map(proc (x, y, z, t) options operator, arrow; x*y*z*t end proc, op(L[i])), i = 1 .. np)

Physics:-`*`(Physics:-`^`(J[x], 2), Physics:-`^`(J[z], 2)), Physics:-`*`(J[x], J[z], J[x], J[z]), Physics:-`*`(J[x], Physics:-`^`(J[z], 2), J[x]), Physics:-`*`(J[z], Physics:-`^`(J[x], 2), J[z]), Physics:-`*`(J[z], J[x], J[z], J[x]), Physics:-`*`(Physics:-`^`(J[z], 2), Physics:-`^`(J[x], 2))

(4)

S := add(j, j = L2)

Physics:-`*`(Physics:-`^`(J[x], 2), Physics:-`^`(J[z], 2))+Physics:-`*`(J[x], J[z], J[x], J[z])+Physics:-`*`(J[x], Physics:-`^`(J[z], 2), J[x])+Physics:-`*`(J[z], Physics:-`^`(J[x], 2), J[z])+Physics:-`*`(J[z], J[x], J[z], J[x])+Physics:-`*`(Physics:-`^`(J[z], 2), Physics:-`^`(J[x], 2))

(5)

NULL

NULL

S1 := Simplify(S, algebrarules)

-(3*I)*Physics:-`*`(J[x], J[y], J[z])-7*Physics:-`^`(J[z], 2)-(8*I)*Physics:-`*`(J[z], J[x], J[y])+6*Physics:-`*`(Physics:-`^`(J[z], 2), Physics:-`^`(J[x], 2))-I*Physics:-`*`(J[y], J[z], J[x])

(6)

NULL

NULL

``


 

Download MapleCode.mw

 


If someone knows, or have suggestions that what i can do to find the right result, plz let me know

I realize that it would be fairly straight forward for me to perform the necessary conversions on the raw data set elements to achieve the same result, but it would be helpful I think if I were able to load the transform into the plot command as I go, basically I want to implement the ability make additions to the list that is on the coords help page, give the entry a name that plot()  will remember, because I will have commentary data on why I was looking at the plot, what ideas it was relevant to, references etc  and date of entry  etc etc that will also be associated with that name.

Essentially a hint as to where I should start is what I need 

When call_external is a part of a procedure, how does one retrive the code pertaining to the external function being called, and how does maple know what call_external refers to, I thought maybe the packages that have been loaded contain these instructions, how can I retrive the relevant code for a given procedure that contains call_external when 'showstat' is used to inspect a command's maple code?

 

The help page for call_external redirects me to define_external, which is really what I expected to need calling before call_external can take on it's necessary meaning.

I have a proc f(a,b)

 

For example

m := n->piecewise(type(n,even),0, 1):
f := proc(a,b)
    m(a*b);
end;

 

when I execute f(a,b) I get 1!!

 

for some reason the type is returning that it is not even, even though the expansion needs to be delayed.

I did this because mod was also doing this. I replaced it so I could undefine m and actually get a general expansion in terms of m.

 

Is there any way to get it to delay the expansion? I guess I need to check if the type is a "variable" or not an itneger and just return it.

 

I've created

 

m := n->piecewise(type(n,even),0, type(n, integer), 1, M(n)):

 

which seems to work but this is not ideal because sometimes M is returned even if an integer is used when used in other expressions. I suppose it is how ever maple figures out how evaluate things.

 

 

Hi,

Sorry to ask such a stupid question but I can't find out where my error is. Probably it's so huge it blinds me!

The double loop and the matrix product F^+ . F should give the same result, no? (it seems that F^+ . F has its rows reordered ?)


 

restart:

N   := 3:
P   := 2:
niv := [seq(Z[i], i=1..N)];
f   := Matrix(N^P, P, (i,j) -> `if`(j=P, niv[(i mod 3)+1], niv[iquo(i-1,3)+1]));

niv := [Z[1], Z[2], Z[3]]

 

f := Matrix(9, 2, {(1, 1) = Z[1], (1, 2) = Z[2], (2, 1) = Z[1], (2, 2) = Z[3], (3, 1) = Z[1], (3, 2) = Z[1], (4, 1) = Z[2], (4, 2) = Z[2], (5, 1) = Z[2], (5, 2) = Z[3], (6, 1) = Z[2], (6, 2) = Z[1], (7, 1) = Z[3], (7, 2) = Z[2], (8, 1) = Z[3], (8, 2) = Z[3], (9, 1) = Z[3], (9, 2) = Z[1]})

(1)

ds := subs(niv =~ [$0..N-1], f);

ds := Matrix(9, 2, {(1, 1) = 0, (1, 2) = 1, (2, 1) = 0, (2, 2) = 2, (3, 1) = 0, (3, 2) = 0, (4, 1) = 1, (4, 2) = 1, (5, 1) = 1, (5, 2) = 2, (6, 1) = 1, (6, 2) = 0, (7, 1) = 2, (7, 2) = 1, (8, 1) = 2, (8, 2) = 2, (9, 1) = 2, (9, 2) = 0})

(2)

vs := [ seq(V__||i, i=1..P)]:
es := unapply( sort( [ seq( mul(vs ^~ [entries(ds[i,..], nolist)]), i=1..N^P) ] ), vs);
 

proc (V__1, V__2) options operator, arrow; [1, V__1, V__2, V__1^2, V__2^2, V__1*V__2, V__1*V__2^2, V__1^2*V__2, V__1^2*V__2^2] end proc

(3)

ff := convert([ seq(es(entries(ffd[i,..], nolist)), i=1..N^P) ], Matrix);


UnityRoots := [solve(z^3=1, z)]:
F := simplify(subs(niv =~ UnityRoots, ff)) /~ sqrt(N^P):

ff := Matrix(9, 9, {(1, 1) = 1, (1, 2) = Z[1], (1, 3) = Z[2], (1, 4) = Z[1]^2, (1, 5) = Z[2]^2, (1, 6) = Z[1]*Z[2], (1, 7) = Z[1]*Z[2]^2, (1, 8) = Z[1]^2*Z[2], (1, 9) = Z[1]^2*Z[2]^2, (2, 1) = 1, (2, 2) = Z[1], (2, 3) = Z[3], (2, 4) = Z[1]^2, (2, 5) = Z[3]^2, (2, 6) = Z[1]*Z[3], (2, 7) = Z[1]*Z[3]^2, (2, 8) = Z[1]^2*Z[3], (2, 9) = Z[1]^2*Z[3]^2, (3, 1) = 1, (3, 2) = Z[1], (3, 3) = Z[1], (3, 4) = Z[1]^2, (3, 5) = Z[1]^2, (3, 6) = Z[1]^2, (3, 7) = Z[1]^3, (3, 8) = Z[1]^3, (3, 9) = Z[1]^4, (4, 1) = 1, (4, 2) = Z[2], (4, 3) = Z[2], (4, 4) = Z[2]^2, (4, 5) = Z[2]^2, (4, 6) = Z[2]^2, (4, 7) = Z[2]^3, (4, 8) = Z[2]^3, (4, 9) = Z[2]^4, (5, 1) = 1, (5, 2) = Z[2], (5, 3) = Z[3], (5, 4) = Z[2]^2, (5, 5) = Z[3]^2, (5, 6) = Z[2]*Z[3], (5, 7) = Z[2]*Z[3]^2, (5, 8) = Z[2]^2*Z[3], (5, 9) = Z[2]^2*Z[3]^2, (6, 1) = 1, (6, 2) = Z[2], (6, 3) = Z[1], (6, 4) = Z[2]^2, (6, 5) = Z[1]^2, (6, 6) = Z[1]*Z[2], (6, 7) = Z[1]^2*Z[2], (6, 8) = Z[1]*Z[2]^2, (6, 9) = Z[1]^2*Z[2]^2, (7, 1) = 1, (7, 2) = Z[3], (7, 3) = Z[2], (7, 4) = Z[3]^2, (7, 5) = Z[2]^2, (7, 6) = Z[2]*Z[3], (7, 7) = Z[2]^2*Z[3], (7, 8) = Z[2]*Z[3]^2, (7, 9) = Z[2]^2*Z[3]^2, (8, 1) = 1, (8, 2) = Z[3], (8, 3) = Z[3], (8, 4) = Z[3]^2, (8, 5) = Z[3]^2, (8, 6) = Z[3]^2, (8, 7) = Z[3]^3, (8, 8) = Z[3]^3, (8, 9) = Z[3]^4, (9, 1) = 1, (9, 2) = Z[3], (9, 3) = Z[1], (9, 4) = Z[3]^2, (9, 5) = Z[1]^2, (9, 6) = Z[1]*Z[3], (9, 7) = Z[1]^2*Z[3], (9, 8) = Z[1]*Z[3]^2, (9, 9) = Z[1]^2*Z[3]^2})

(4)

Scalar products of pairs of comumn vectors

F must be an orthogonal array

for i1 from 1 to N^P do
  for i2 from 1 to N^P do
    printf("%a ", simplify(add(F[..,i1] . F[.., i2])))
  end do:
  printf("\n"):
end do:
printf("\n");

1 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0
0 0 0 0 1 0 0 0 0
0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 1
 

 

or more simply:

simplify(F^+ . F)

Matrix([[1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0]])

(5)

 


 

Download Too_Blind_To_Find_My_Mistake.mw

I have several plots where I use display(a,b,c). Maple displays them with display(actual plot of a, actual plot of b, ...).
I've tried adding insequence but nothing and also tried passing them as sets or lists. In earlier versions I could use display(plots) and it would display all the plots on one plot together but now maple always separates them. I'd rather have the old behavior.

How do I get them to plot on the same plot and is there any way to set it as a global ooption?

what is the wrong in this operations for isentropic process ( isentropic-process) 

 

Restart: with(RealDomain) : interface(dispalyprecision=4) : ; Isentropical := proc(N,v) local K,PTR,KM1,KP1,GO, M,MS,C,PPT,TTT,RRT,AAS,eq,o ; K : = G() : KM1 : = k - 1 : KP1 : = K + 1 : GO := 1 : If N=1 then M := v Elif N=2 then PPT := v : M := sqrt ( 2 * (PPT^(-KM/K) -1 ) : Elif N=3 then MS := v : M := sqrt ( 1 / (KP1/ (2*MS^2) –KM1/2 ) : Elif N=4 then C := v : M := sqrt ( 2 / (KM1* (1 /(C^2) -1 )) ) : Elif N=5 then TTT := v : M := sqrt ( 2 * (1/TTT-1 ) / KM1 : Elif N=6 then RRT := v : M := sqrt ( 2 * (1/RRT^KM1 -1 ) / KM1 : Elif N=7 then AAS := v : eq :=AAS- (2*(1+KM1*M^2/2)/ KP1) ^ (KP1/ (2*KM1)) /M : M := fsolve(eq,M,0..1) : GO :=2 : Elif N=8 then AAS := v : eq :=AAS- (2*(1+KM1*M^2/2)/ KP1) ^ (KP1/ (2*KM1)) /M : M := fsolve(eq,M,1..infinity) : GO :=2 : Fi:fi GO<>2 then ASS := (2 *(1+ KM1*M^2/2/KP1) ^ (KP1/ (2*KM1)) /M fi: PTR := (1+ KM1*M^2/2/KP1) : PPT := PTR^(-K/KM1) : TTT:=PTR^ (-1) : RRT:+PTR^(-1/KM1) : If N <> 3 then MS := sqrt ( KP1 / ( 2 / ( M^2)+KM1) ) If N <> 3 then C := sqrt( 1 / (2 / (KM1*M^2) + 1 ) ) O := evalf([m,1./PPT,MS,C,1./TTT,1./RRT,AAS]) end : irp := proc (N, v) local f; f:=Isentropic1(N,v) : printf(cat(`% 9.4f `$7, ` \ n`) , f[ii$ii=1..7]) end : G := ( ) -> 1.4 : For mi form .1 to .5 do irp(1.mi) od : > > > Eq := table( [ (M2) = M2 , (MS2) = (K+1) /2 (2 / ( M2)+ (K-1) ) (C2) = 1 / (2 / (K-1)*M2+1 ) (PP0) = (1+(K-1)*M2/2)^(-K/(K-1) ) (RR0) = (1+(K-1)*M2/2)^(-1/(K-1) ) (TT0) = (1+(K-1)*M2/2)^(-1) (AAS) = (2 *(1 +(K-1)*M2/2 ) / (K+1) )^( (k-1) /(2*(k-1)))/ squt(M2) ]) : if vL=M then M2v := solve ( M2 -Eq[M2 ] , M2 ) : M2v := eval(M2v ,M2 = VR^2 ) : elif vL=MS then M2v := solve( M2 -Eq[MS2 ] , M2 ) : M2v := eval(M2v ,MS2 = VR^2 ) : elif vL=C then M2v := solve( M2 -Eq[C2 ] , M2 ) : M2v := eval(M2v ,C2 = VR^2 ) : elif vL=PP0 then M2v := solve( M2 -Eq[PP0] , M2 ) : M2v := eval(M2v ,PP0 = VR ) : elif vL=RR0 then M2v := solve( M2 -Eq[RR0] , M2 ) : M2v := eval(M2v ,RR0 = VR ) : elif vL=TT0 then M2v := solve( M2 -Eq[TT0] , M2 ) : M2v := eval(M2v ,TT0 = VR ) : elif vL=AASsub then M2v := fsolve( M2 -Eq[AAS] , M2 ) : M2 :=0..1 : elif vL=AASup then M2v := fsolve( M2 -Eq[AAS] , M2 ) : M2 :=1..infinity : fi: Eqsva1 := eva1(Eq, M2 = M2v) : Eqava1 [M] := sqrt(EqsVa1[M2] ) : Eqsva1[MS] := sqrt(EqsVa1[MS2] ) : Eqava1 [C] := sqrt(EqsVa1[C2] ) : 1var := [M, MS, C, PP0, RR0, TT0, AAS] : [seq(1var[i]=EqsVA1[1var[i] ] , I=1…nope(1var))] end: Egs :=[M=0.5, MS=0.53452, C=0.2182, P0P=0.84302, RR0=0.88517, TT0=0.95238, AASsub=1.33985, AASsup=0.95238] : For i from 1 to nops(Egs) do print(I,Isentropic2(Egs[i])) od : (process)

I have functions with sin(x) and  cos(x) terms with x values are degrees.

How to calculate sin(30 degree)?

How to insert degree symbol in maple?

Suppose evaluate  sin(Pi/2), my out put becomes sin(Pi/2)...How to solve this problem?

1 2 3 4 5 6 7 Last Page 1 of 1596