Maple 2021 Questions and Posts

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

I drew a methane molecula and display three times because I wanted to get two-fold and three-fold symmetry axis. ,I would is that I would like to get a more exact output and doing it without clicking, it's say, using code. Can someone help me?tareaclase6.mw
 

University of Costa Rica 

Course: SP-1493

Student: Lic. Marcus Vinicio Mora Salas

Instructor: Dr. Erick Castellón Elizondo

 

Assigment5

Description

 

In this assigment exercises e2.113,  e2.114, e2.115 and e2.117 was solved.

NULL

***e2.113

   

 

 

 

NULL


 

Download tareaclase6.mw

 

Suppose I have a real function which is defined on these intervals [x0,x1],...[x1,xn], and on each interval it's defined differently, for example f(x):=sqrt(x) if x>=0; f(x):=1/x if x<0.

For the last example I tried my last resort to use the assuming operator the following way:

f := ((x -> sqrt(x)) assuming (0 <= x)) or ((x -> 1/x) assuming (x < 0)) plot(f, x)

But it doesn't seem to be working, how do you propose to define this function? perhaps proc?

I tried looking for an example in maple's help, but didn't find any.

Your help is appreciated.

I read that abs(v) should find the magnitude of complex number. But I find cases where it does not.

Should one then use sqrt( Re(v)^2 + Im(v)^2 ) instead or is there different command to use?  Here is an example

interface(version)

`Standard Worksheet Interface, Maple 2021.2, Windows 10, November 23 2021 Build ID 1576349`

restart;

v:=1/16*(I*5^(1/2)+I-4*sin(1/5*Pi))*2^(3/10)*(5-5^(1/2))^(1/2)-1/8*2^(4/5)*((I*5^(1/2)+I)*sin(1/5*Pi)+1/2*5^(1/2)+3/2)

(1/16)*(I*5^(1/2)+I-4*sin((1/5)*Pi))*2^(3/10)*(5-5^(1/2))^(1/2)-(1/8)*2^(4/5)*((I*5^(1/2)+I)*sin((1/5)*Pi)+(1/2)*5^(1/2)+3/2)

abs(v)

-(1/16)*(I*5^(1/2)+I-4*sin((1/5)*Pi))*2^(3/10)*(5-5^(1/2))^(1/2)+(1/8)*2^(4/5)*((I*5^(1/2)+I)*sin((1/5)*Pi)+(1/2)*5^(1/2)+3/2)

sqrt( Re(v)^2 + Im(v)^2 );

((-(1/4)*2^(3/10)*(5-5^(1/2))^(1/2)*sin((1/5)*Pi)-(1/8)*2^(4/5)*((1/2)*5^(1/2)+3/2))^2+((1/16)*2^(3/10)*(5-5^(1/2))^(1/2)*(5^(1/2)+1)-(1/8)*2^(4/5)*(5^(1/2)+1)*sin((1/5)*Pi))^2)^(1/2)

 

Download complex.mw

Here is the same thing in Mathematica:

I searched help for modulus but could not find one.

Maple 2021.2

question8.mw

In the exercise uploaded I have to plot asymptotes of a function. I know this is possible using definitions of all kind of asymptotes and ploting in a figure. However I would like to know if exists some parameter for plot method that automatically show asymptotes.

question7.mw

NULL

***e2.106

 

Plot this couple of parametric equations, identify the geometric figure known as the folium of Descartes , and relate properties of the figure to numerical coefficients in the equations.

  x = 3*t/(t^3+1), y = 3*t^2/(t^3+1)   

NULL

restart: with(plots):

 

 

 

See how the plot of the folium of Descartes can be built with the following code:

d1 :=

Error, invalid terms in product: -10 .. 10

Error, invalid terms in product: -10 .. 10

Error, (in plots:-pointplot) points cannot be converted to floating-point values

NULL

NULL

Download question7.mw

For this question I need that who help me focus in second block of code in the document. Basically, what I am trying is to get a plot of folium of Dercastes using parametric equation to plot ordered pairs. In order to success, is needed to exclude t=-1. In the block is showed what I tried. I concluded that my approach in solving that part of exercise is wrong. What could be a well approach?

question6.mw
How you can see, in the following exercise I built five plots, every one with the graph of two functions. The exersise say that I must find coordinates of any intersection. I think I can do it with solve command. However, I want point out coordinates of  intersections inside the plots. Probably exists a command or a parameter to success with my objetive. How can I do it?

NULL

*** e2.103

 

Plot the following couples of formulae; note in particular the contrasting forms of two curves in each case, and find the coordinates of any intersections.

i)    {x, x^3},

ii)    {x^2, x^4},

iii)    {1/x, 1/x^2},

 iv)   {x^2, sqrt(x)},

 v)   {x^3, abs(x^(1/3))}

 

restart:

NULL

Thank you for helping me;
Greetings;
Lic. Marcus Vinicio Mora Salas;
Chemist;
Postgraduate student at University of Costa Rica;

Download question6.mw

question5.mw

In document uploaded I tried to write a code to get as output 11 plots. I would like a format as this: 9 plots in 3 columns an 3 rows, and a fourth row with two center plots. To explain me better, I drew a rustic sketch of what I want, basically something like this:

However I tried but I fail and my output is horrible. So, I want to ask: Does exists some option to the plot[display] command or should I try another aproach?

Thank you for helping me;
Greetings;
Lic. Marcus Vinicio Mora Salas;
Chemist;
Postgraduate student.

As part of my course work I've encountered a block wherein I need to convert a 4th order TF to a SmithForm but am unable to do so.

Can anyone help me with the code as attatched.

A := Matrix([[(.3384*x^3-26.13*x^2-.3659*x+0.1678e-1)/(s^4+3.068*s^3-3.362*s^2-.5748*s+.7598), (.4755*s^3-25.3*s^2-51.36*s-1.387)/(s^4+3.068*s^3-3.362*s^2-.5748*s+.7598)], [(-.3349*s^3+18.21*s^2+.3487*s-0.5939e-1)/(s^4+3.068*s^3-3.362*s^2-.5748*s+.7598), (-.3107*s^3+17.81*s^2+35.49*s+1.027)/(s^4+3.068*s^3-3.362*s^2-.5748*s+.7598)]])

Matrix(%id = 36893488152131246308)

(1)

"->"

Error, (in gcdex) invalid arguments

 

"->"

SmithForm(Matrix(%id = 36893488152131266788))``

(2)

with(LinearAlgebra)

NULL

S := SmithForm(A, s)

Error, (in gcdex) invalid arguments

 

with(LinearAlgebra); A := Matrix([[1, 2*x, 2*x^2+2*x], [1, 6*x, 6*x^2+6*x], [1, 3, x]])

Matrix(%id = 36893488152361731844)

(3)

S := SmithForm(A, x)

Matrix(%id = 36893488152348668020)

(4)

NULL

Download SmithForm.mw

This is a simple problem of Chemistry. I solved the exercise, but there are three aspects I don't like about output:
1) Even kg*m2 *s-2 = J (SI unit to energy) and both are correct, one must be explicit with units in order to be totally clear, so I need an output with units of J/mol and not kg*m2 *s-2 mol-1.
2) I had to hardcode number of significant figures, so I had to analize quantitys in order to determine this number, wich as you can see, is three. I think Maple can compute significant figures automatically, but I could not find the command in documentation and even in this case is not totally needed, I would like to learn how do it because it could be very useful for more complex expressions.
3) Finally, output must be expressed using scientific notation, it's say enthalpy = 10.4*104 J/mol.
Therefore: How can I get adecuate output?
Thank you for helping me;
Greetings;
Lic. Marcus Vinicio Mora Sallas;
Chemist;
Postgraduate student. question4.mw

*** e1.501

 

Using this equation attributed to Clausius and Clapeyron,

ln(P[2]/P[1]) = Delta*H[vap]/R 1/T[1]-1/T[2]

and these data for the vapour pressure of liquid mercury at the indicated temperatures,

      P =  1.6 10^(-4) Pa at T = 273.15 K and P = 36.4 Pa at T = 373.15 K

estimate the enthalpy change Delta*H[vap] for vapourization of mercury over this range of temperature.

 

p := [1.6e-4*Unit('Pa'), 36.4*Unit('Pa')]:

Delta(H[vap]) = 0.105e6*Units:-Unit(m^2*kg/(s^2*mol*K))*Units:-Unit(K)

``

Download question4.mw

system_of_PDE.mw

NULL

NULL

Digits := 30; with(PDEtools); with(plots); Ops1 := numpoints = 100; Ops2 := color = magenta; Ops3 := color = blue; Ops4 := color = "BlueViolet"; Ops5 := axes = boxed, shading = zhue, orientation = [40, 50]; a := 0; b := 1; Tf := .5

axes = boxed, shading = zhue, orientation = [40, 50]

 

.5

(1)

E := 1480

1480

(2)

Ebes := 5990

5990

(3)

n0 := 900000

900000

(4)

ro := 1200

1200

(5)

m := 12.6

12.6

(6)

f := sig(x, t)-Ebes*`&varepsilon;ij`(x, t)

sig(x, t)-5990*`&varepsilon;ij`(x, t)

(7)

n := 900000*exp(-(sig(x, t)-E*`&varepsilon;ij`(x, t))/m)

900000*exp(-0.793650793650793650793650793651e-1*sig(x, t)+117.460317460317460317460317460*`&varepsilon;ij`(x, t))

(8)

NULL

P := 5

5

(9)

w := 4

4

(10)

k := 7

7

(11)

i := 5

5

(12)

eq1 := diff(sig(x, t), x, x) = ro*(diff(sig(x, t), x, x))/E+ro*(diff(sig(x, t), t)-Ebes*f/(9000000*exp(-(sig(x, t)-E*`&varepsilon;ij`(x, t))/m)))*(1+f/m)/(9000000*exp(-(sig(x, t)-E*`&varepsilon;ij`(x, t))/m))

diff(diff(sig(x, t), x), x) = (30/37)*(diff(diff(sig(x, t), x), x))+(1/7500)*(diff(sig(x, t), t)-(599/900000)*(sig(x, t)-5990*`&varepsilon;ij`(x, t))/exp(-0.793650793650793650793650793651e-1*sig(x, t)+117.460317460317460317460317460*`&varepsilon;ij`(x, t)))*(1+0.793650793650793650793650793651e-1*sig(x, t)-475.396825396825396825396825397*`&varepsilon;ij`(x, t))/exp(-0.793650793650793650793650793651e-1*sig(x, t)+117.460317460317460317460317460*`&varepsilon;ij`(x, t))

(13)

 

eq2 := diff(`&varepsilon;ij`(x, t), t) = f/(9000000*exp(-(sig(x, t)-E*`&varepsilon;ij`(x, t))/m))

diff(`&varepsilon;ij`(x, t), t) = (1/9000000)*(sig(x, t)-5990*`&varepsilon;ij`(x, t))/exp(-0.793650793650793650793650793651e-1*sig(x, t)+117.460317460317460317460317460*`&varepsilon;ij`(x, t))

(14)

NULL

sys := {eq1, eq2}

{diff(diff(sig(x, t), x), x) = (30/37)*(diff(diff(sig(x, t), x), x))+(1/7500)*(diff(sig(x, t), t)-(599/900000)*(sig(x, t)-5990*`&varepsilon;ij`(x, t))/exp(-0.793650793650793650793650793651e-1*sig(x, t)+117.460317460317460317460317460*`&varepsilon;ij`(x, t)))*(1+0.793650793650793650793650793651e-1*sig(x, t)-475.396825396825396825396825397*`&varepsilon;ij`(x, t))/exp(-0.793650793650793650793650793651e-1*sig(x, t)+117.460317460317460317460317460*`&varepsilon;ij`(x, t)), diff(`&varepsilon;ij`(x, t), t) = (1/9000000)*(sig(x, t)-5990*`&varepsilon;ij`(x, t))/exp(-0.793650793650793650793650793651e-1*sig(x, t)+117.460317460317460317460317460*`&varepsilon;ij`(x, t))}

(15)

NULL

IBC1 := {sig(0, t) = P*sin(w*k*i), sig(10, t) = P*sin(w*k*i), sig(x, 0) = 0, sig(x, 1) = 0, `&varepsilon;ij`(x, 0) = 0}

{sig(0, t) = 5*sin(140), sig(10, t) = 5*sin(140), sig(x, 0) = 0, sig(x, 1) = 0, `&varepsilon;ij`(x, 0) = 0}

(16)

S := 1/100; Ops := spacestep = S, timestep = S; Sol1 := pdsolve(sys, IBC1, [sig, `&varepsilon;ij`], numeric, time = t, range = a .. b, Ops)

1/100

 

spacestep = 1/100, timestep = 1/100

 

Error, (in pdsolve/numeric) unable to handle elliptic PDEs

 

``

Download system_of_PDE.mw

In relation with the following code and its respective output:

I want get an output in wicht left side of equalitys be expressed in radical terms and not in terms of trigonometric expressions. I tried convert(expr, radical), but the result is not that I want. Could someone help me please? Also I want to know if exists a method to avoid hardcoding list of the forloop other than [seq(i, i = 1..5)];

Thank you for helping me;
Greetings;
Lic. Marcus Vinicio Mora Salas;
Chemist;
postgraduate student in University of Costa Rica

Do someone tell me how can I solve this exersise using a created procedure? Also I would like to know if using a procedure is useful and if in that form code lines will be reduce. If procedures are not useful. What is the best aproach?

Here the exercise and the code:

Before to begin to learn Maple, I used to do math with python. I usually built function and classes in order to reduce code lines and to generalize the problem, but I don't know if this aproach is useful with Maple. In fact, I have another question. Is it possible to write in a document some codeblocks using Maple and another using python? If answer is yes, how can I do it?

Thank you for helping me;
Greetings;
Lic. Marcus Vinicio Mora Salas
Chemist

Hi MaplePrimes team,

Is there a generalized way to fill an extremely CONCAVE closed 3d parametric plane curve in Maple with spacecurve command (NO implicitplot3d), preferably without doing any multi-decomposition or creating a particular skeleton, or algorithm/programming?

Here my example:

 

#Circle of reference
R0 := 1:
C0 := t-> < cos(t), sin(t), 0 >:

#Variable radius
R := t-> R0*(1 + 1/2*sin(t)):

#Variable phase
Dt := t-> Pi/2*sin(2*t):

#CONCAVE Curve
C := t-> R(t)*C0(t - Dt(t)):
'C(t)' = C(t);

#Range
t1, t2 := 0, 2*Pi:

#Plot
GC := spacecurve(C(t), t = t1..t2, color = "Red", thickness = 3
, linestyle = solid
, scaling = constrained, axes = frame, orientation = [50,40,0]):
GC;

We know how to do it easily for any convex 3d plane curve (circle, ellipse, regular polygon, etc ...).

We also know how to do it for 2d curve with the Maple’s plot option filled = true but obviously not in 3d.

Thank you for your time.

Best.

Guy.

I have defined a function II1norm of one variable. The variable has units "microns". It plots perfecting using a range defined in microns, but gives an error when I try to find the root using NextZero. If I just leave off the "microns" in the second argument, NextRoot just reports "FAIL". If I rewite the worksheet without units, then the NextZero executes fine. Why? How to I use units when finding roots?

Hello there, 

Would you allow me to ask one question?

Is there any way to get a saturated water vapor pressure value with a temperature outside of the range?

The range here means [273.06 K, 647.096 K]. The pressure value certainly exists (T<273.06 K), but the API only comes up with an error. 

Here is the Maple worksheet where I got into this issue:

restart;

with(ThermophysicalData):

with(CoolProp):        

with(Units[Standard]):

with(ScientificConstants):

T2 := (-40.0 + 273.15) * Unit('K');

233.15*Units:-Unit(K)

(1)

xbb := 1: # 100% steam, saturated.

Pg2 := PropsSI("P", "T", T2, "Q", xbb, "water");

Error, (in ThermophysicalData:-CoolProp:-PropsSI) Temperature to QT_flash [233.15 K] must be in range [273.06 K, 647.096 K] : PropsSI("P","T",233.15,"Q",1,"water")

 

 

Download Q20220111.mw

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