acer

32343 Reputation

29 Badges

19 years, 328 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@dharr Yes, evalf(D[...](...)) is a hook into fdiff .

NULL``

restart;

eq := diff(Tf(x, y), x) = diff(Tf(x, y), y, y):

Cl := {1 = Tf(0, y), (D[2](Tf))(x, 0) = 1, (D[2](Tf))(x, 1) = 1}:

pds := pdsolve(eq, Cl, numeric):

NULL

ppp := pds:-value(output=listprocedure):

TF := eval(Tf(x,y),ppp):

plot([TF(0.1,y), D[2](TF)(0.1,y)], y=0..1, color=[red,blue]);

#plot([y->TF(0.1,y),
#      Y->TF(0.1, 1e-5)+evalf(Int(y->evalf(D[2](TF)(0.1,y)), 1e-5..Y,
#                                 epsilon=0.01, method=_d01ajc))],
#     1e-5 .. 0.9, adaptive=false, numpoints=15, style=[line,point]);

``

Download pdsolve_mapleprime_ac.mw

@waseem What your latest image shows is not possible purely as a single, combined, plotting structure. There would always be a border around the upper text, if added as a textplot in a row either on top or below.

If you display only your original P1 then you can right-click within the border of the Table that gets shown, and manually set its caption to some centered plaintext. But that does not allow for typeset Greek letters, as far as I know.

There are ways to generate programmatically a GUI Table with the desired look, but you wouldn't be able to export it as a single graphic. And that wouldn't be possible in Maple 13 (you'd need Maple 2015 at least I think).

Another possibility is to manually insert a GUI Table from the menubar. Give it 2 rows and 1 column. Copy and paste the array-plot output from the original display(P1) call into the lower row. Add the desired mixex text&math to the upper row, and center it. With the cursor in the upper row, right-click and toggle off all its exterior and interior border. Now you have a single GUI Table that contains all you wanted. You can even remove the original output. Like this:

table_row.mw

@waseem How about this,

restart:
with(plots):

h:=z->1-(delta2/2)*(1 + cos(2*(Pi/L1)*(z - d1 - L1))):
K1:=((4/h(z)^4)-(sin(alpha)/Gamma2)-h(z)^2+Nb*h(z)^4):
lambda:=unapply(Int(K1,z=0..1), Gamma2):
L1:=0.2:
d1:=0.2:
alpha:=Pi/6:
P1:=( Vector[row]
( [ seq
   ( display(
         textplot([0.065,4.5,typeset("Effect of ",''`α`''=3,",",
                                     ''`Γ`''=Gamma2," in the flow")]),
         plot
         ( [ seq
              ( eval(lambda(Gamma2), Nb=j),
                j in [0.1,0.2,0.3]
              )
            ],
            delta2=0.02..0.1,
            legend=[Nb=0.1,Nb=0.2,Nb=0.3],
            labels=[typeset(`δ1`), typeset(conjugate(`Δp`))]
            #,title=typeset("Effect of ", ''alpha'', " when ", Gamma,"2=", Gamma2)
          ) ),
          Gamma2 in [10,20,30]
        )
      ]
    )
  ):

display(P1);

@brian bovril It seemed to me that Rfun gets weird for larger CPC values, while Cfun produces more reasonable values.

@adel-00 Please don't ask the same question twice.

Please don't repeat the Question, just because you haven't received a satisfactory answer.

If you have followup comments and specific details about what you'd like to accomplish with such noncommutative operators, then please add them here in Comments.

(It's possible that the Physics package might allow some progress.)

How would you want to handle supplying the constant to appear in the range of integration, depending on f?

You can write an extension procedure, which gets picked up by convert(...,Int) .  Eg,

showstat(`convert/Int/from`[invfourier]);

@student_md 

Kitonum is using the parametric calling sequence of the plot3d command, where each of the three entries is a procedure (of two parameters).  The names of the parameters of the procedures are just dummy names. You could label them "y" and "t" or what you wish, no?

You asked for a particular meaning, ie, "In 3D plot, the axis must be ( y, t, X(t)*sin(y) )". So how are the meaning for the two parameters not understood?

Please put your followup queries here, rather than as new Questions.

@Carl Love Sometimes the MS-Windows folks refer to a .dll as a module.

It sounds as if the OP is trying to run maple under a C/C++ debugger.

If the OP created the .dll himself then it'd up to him to build/link it with debugging info. I'm not sure how much that'd help him, though.

Maple does not ship with debugging info/versions of all its own .dlls .

There are a lot of details missing in this question.

@max125 The int command does not have special evaluation rules, by which is meant that it evaluates its arguments up front, before computing.

In consequence when you enter nested int calls the inner one is computed up front, and when that happens it does not have knowledge of the outer integrals ranges of integration.

For this example, the inner integrals are computed without the knowledge that x>-1, x<1.

But when you use the collapsed syntax of a single call to int (with multiple ranges supplied) then it can have that knowledge.

For you example, it makes a difference to the form that is attained for the middle integration.

restart;

kernelopts(version);

`Maple 2018.1, X86 64 LINUX, Jun 8 2018, Build ID 1321769`

assume(x>-1, x<1);

int(int(int(1, z=2*sqrt(x^2+y^2)..2),y=-sqrt(1-x^2)..sqrt(1-x^2)),x=-1..1);

(2/3)*Pi

restart;

int(int(1, z=2*sqrt(x^2+y^2)..2),y=-sqrt(1-x^2)..sqrt(1-x^2));

2*(-x^2+1)^(1/2)+x^2*ln(-(-x^2+1)^(1/2)+1)-x^2*ln((-x^2+1)^(1/2)+1)

int(%, x=-1 .. 1);

int(2*(-x^2+1)^(1/2)+x^2*ln(-(-x^2+1)^(1/2)+1)-x^2*ln((-x^2+1)^(1/2)+1), x = -1 .. 1)

restart;

assume(x>-1, x<1);

int(int(1, z=2*sqrt(x^2+y^2)..2),y=-sqrt(1-x^2)..sqrt(1-x^2));

-2*x^2*arcsinh(signum(x)*(-x^2+1)^(1/2)/x)+2*(-x^2+1)^(1/2)

int(%, x=-1 .. 1);

(2/3)*Pi

restart;

int(int(1, z=2*sqrt(x^2+y^2)..2),y=-sqrt(1-x^2)..sqrt(1-x^2)) assuming x>-1, x<1;

-2*x^2*arcsinh(signum(x)*(-x^2+1)^(1/2)/x)+2*(-x^2+1)^(1/2)

int(%, x=-1 .. 1);

(2/3)*Pi

restart;

int(int(int(1, z=2*sqrt(x^2+y^2)..2),y=-sqrt(1-x^2)..sqrt(1-x^2)),x=-1..1);

int(2*(-x^2+1)^(1/2)+x^2*ln(-(-x^2+1)^(1/2)+1)-x^2*ln((-x^2+1)^(1/2)+1), x = -1 .. 1)

restart;

# This one does not succeed, for a complicated reason
# relating to the specific implementation of `assuming`.
# It worked, as first example above, with `assume`.

int(int(int(1, z=2*sqrt(x^2+y^2)..2),y=-sqrt(1-x^2)..sqrt(1-x^2)),x=-1..1) assuming x>-1, x<1;

int(2*(-x^2+1)^(1/2)+x^2*ln(-(-x^2+1)^(1/2)+1)-x^2*ln((-x^2+1)^(1/2)+1), x = -1 .. 1)

 

Download nested_int_example.mw

When entering an integral (as typeset 2D Math) from the palette, don't overwrite the Roman (upright font) d with the name d, when inserting the dt part. Only enter the t, after the d. A visual indication that it's not right is that the dt has the d in italics.

 

@Alger A 3D plot in Maple doesn't support a legend, and the choices of location of a caption are limited.

So it may be that a colorbar is preferable, even though it is finicky to get it displayed just right.

Here is one way to get that:

essai_colorbar.mw

 

You have four-dimensional data.

Two common ways to visualize that in 3D plotting is to choose one of the four dimensions and use it for either color/shading or repesentation in time (for an animation).

It may be that either z[i] or A(...i...) is a nicer choice for that treatment.

But it's not possible to say with assurance which is nicer since it will depend on how all the data lies.

And you have not given us the data.

@Carl Love Great.

So I suppose you could add that to the `ModuleLoad`.

Perhaps the `ModuleApply` could accept anything, and return the first argument if it were not of the new type `RealIntervals`.

@student_md 

The fancy GUI table cannot be converted to LaTeX, though it is possible to generate some lengthy XML. Doing anything with all that in LaTeX would likely be very difficult.

The easiest thing would be just to convert the 2-column Matrix to LaTeX, which produces \begin{array} ... \end{array}. If you needed to you could substitute "tabular" for "array" in the LaTeX string generated.

Below, I strip out the left- and right square brackets.

I notice that the Maple LaTeX command is mis-treating floats, when handling the Matrix. So it turns 1.2345e-11 into 0.000000000012345 which is not nice. So I'll include some patch-ups involving float notations. (Goodness, it'd probably be easier to write a better Matrix-to-LaTeX export from scratch. Oh well.)

restart:

n:=1:
m:=2:  
E:= 1.75*10^(3):  
l:=10:  
II:=10^(3):  
v:=10:  
M:=10:  
a:=0.1:  
g:=9.8:  
tf:=10:

w1:=sqrt(E*II/m)*(Pi/l)^2:
a_0:=Pi*a/(w1^2*l):
m_0:=M/(m*l):
v_0:=v/w1:
delta:=4*m*g*l^4/E*II*Pi^5:
tau:=w1*t:

p:=sin(v_0*tau)*sin(v_0*tau):
h:=sin(v_0*tau)*cos(v_0*tau):
z:=2:

M:= tau -> 1+2*m_0*sin(v_0*tau)*sin(v_0*tau):
C:=tau -> 2*m_0*(v_0*tau)*sin(v_0*tau)*cos(v_0*tau):

K:=tau ->1-2*m_0*v_0^2*sin(v_0*tau)*sin(v_0*tau)+2*m_0*a_0*cos(v_0*tau)*sin(v_0*tau):
f:=tau -> m_0*Pi/2+m_0*v_0^2*p*z-m_0*a_0*h*z:
X:=x(t):   
  
sys:= delta*(M(t)*diff~(X, t$2)+C(t)*diff~(X, t))+K(t)*X=f(t):

IC:=x(0)=0,D(x)(0)=0: # or you can define any Initial conditions
sys1:={sys,IC}:

numSol:=dsolve(sys1,numeric,method=rkf45, range=0..1, output=listprocedure):

xx := eval(x(t), numSol):

V1 := Vector([seq(0.1..1, 0.1)]):

V2 := map(xx, V1):

M := <V1|evalf[5](V2)>;

Matrix(10, 2, {(1, 1) = .1, (1, 2) = 0.2870700000e-10, (2, 1) = .2, (2, 2) = 0.1152100000e-9, (3, 1) = .3, (3, 2) = 0.2593600000e-9, (4, 1) = .4, (4, 2) = 0.4607600000e-9, (5, 1) = .5, (5, 2) = 0.7194100000e-9, (6, 1) = .6, (6, 2) = 0.1035700000e-8, (7, 1) = .7, (7, 2) = 0.1409400000e-8, (8, 1) = .8, (8, 2) = 0.1840100000e-8, (9, 1) = .9, (9, 2) = 0.2327700000e-8, (10, 1) = 1.0, (10, 2) = 0.2871800000e-8})

with(StringTools):

SubstituteAll(Substitute(Substitute(latex(M,'output'='string'),
                                    "\\left[ ",""),"\\right]",""),"`","");

" \begin {array}{cc}  0.1&{ 2.8707\times 10^{-11}}\\ \noalign{\medskip} 0.2& 0.00000000011521\\ \noalign{\medskip} 0.3& 0.00000000025936\\ \noalign{\medskip} 0.4& 0.00000000046076\\ \noalign{\medskip} 0.5& 0.00000000071941\\ \noalign{\medskip} 0.6& 0.0000000010357\\ \noalign{\medskip} 0.7& 0.0000000014094\\ \noalign{\medskip} 0.8& 0.0000000018401\\ \noalign{\medskip} 0.9& 0.0000000023277\\ \noalign{\medskip} 1.0& 0.0000000028718\end {array}  "

 

M := <map[2](nprintf,"%.2g",V1)|map[2](nprintf,"%.5g",V2)>;

Matrix(10, 2, {(1, 1) = `0.1`, (1, 2) = `2.8707e-11`, (2, 1) = `0.2`, (2, 2) = `1.1521e-10`, (3, 1) = `0.3`, (3, 2) = `2.5936e-10`, (4, 1) = `0.4`, (4, 2) = `4.6076e-10`, (5, 1) = `0.5`, (5, 2) = `7.1941e-10`, (6, 1) = `0.6`, (6, 2) = `1.0357e-09`, (7, 1) = `0.7`, (7, 2) = `1.4094e-09`, (8, 1) = `0.8`, (8, 2) = `1.8401e-09`, (9, 1) = `0.9`, (9, 2) = `2.3277e-09`, (10, 1) = `1`, (10, 2) = `2.8718e-09`})

with(StringTools):

SubstituteAll(Substitute(Substitute(latex(M,'output'='string'),
                                    "\\left[ ",""),"\\right]",""),"`","");

" \begin {array}{cc} \mbox {{\tt 0.1}}&\mbox {{\tt 2.8707e-11}}\\ \noalign{\medskip}\mbox {{\tt 0.2}}&\mbox {{\tt 1.1521e-10}}\\ \noalign{\medskip}\mbox {{\tt 0.3}}&\mbox {{\tt 2.5936e-10}}\\ \noalign{\medskip}\mbox {{\tt 0.4}}&\mbox {{\tt 4.6076e-10}}\\ \noalign{\medskip}\mbox {{\tt 0.5}}&\mbox {{\tt 7.1941e-10}}\\ \noalign{\medskip}\mbox {{\tt 0.6}}&\mbox {{\tt 1.0357e-09}}\\ \noalign{\medskip}\mbox {{\tt 0.7}}&\mbox {{\tt 1.4094e-09}}\\ \noalign{\medskip}\mbox {{\tt 0.8}}&\mbox {{\tt 1.8401e-09}}\\ \noalign{\medskip}\mbox {{\tt 0.9}}&\mbox {{\tt 2.3277e-09}}\\ \noalign{\medskip}\mbox {{\tt 1}}&\mbox {{\tt 2.8718e-09}}\end {array}  "

SubstituteAll(SubstituteAll(Substitute(Substitute(latex(M,'output'='string'),
                                    "\\left[ ",""),"\\right]",""),"`",""),"\\tt","");

" \begin {array}{cc} \mbox {{ 0.1}}&\mbox {{ 2.8707e-11}}\\ \noalign{\medskip}\mbox {{ 0.2}}&\mbox {{ 1.1521e-10}}\\ \noalign{\medskip}\mbox {{ 0.3}}&\mbox {{ 2.5936e-10}}\\ \noalign{\medskip}\mbox {{ 0.4}}&\mbox {{ 4.6076e-10}}\\ \noalign{\medskip}\mbox {{ 0.5}}&\mbox {{ 7.1941e-10}}\\ \noalign{\medskip}\mbox {{ 0.6}}&\mbox {{ 1.0357e-09}}\\ \noalign{\medskip}\mbox {{ 0.7}}&\mbox {{ 1.4094e-09}}\\ \noalign{\medskip}\mbox {{ 0.8}}&\mbox {{ 1.8401e-09}}\\ \noalign{\medskip}\mbox {{ 0.9}}&\mbox {{ 2.3277e-09}}\\ \noalign{\medskip}\mbox {{ 1}}&\mbox {{ 2.8718e-09}}\end {array}  "

 

Download student_md_question_2_acc.mw

 

First 236 237 238 239 240 241 242 Last Page 238 of 592