mmcdara

3442 Reputation

16 Badges

5 years, 232 days

MaplePrimes Activity


These are replies submitted by mmcdara

@acer 

Ok, I understand the confusion my personal license is a 2015 (but a 2021 at work) and I thought the problem was my using a personal license and not an older version of MAPLE.

@Christopher2222 

The only workaround is to use the open page as worksheet, which is not ideal.  I thought opening another session of maple would work but that only refers to the already open help.

Sure, but as I just said to acer this doesn't work if you have a personal license, and opening two windows can cause other problems.

@acer 

For some entries there is indeed this possibility to open in a new tab or in a new window.
But Open in New Window doesn't work if you have a personal license.

What I thought about was for instance to have multiple help pages open at the same time. For instance if you search select 
the help advices you to look to member, membertype and selectfun, and membertype to has, and so on.
Of course the left and right blue arrows allows you to go back and forth, but I think this could be improved.

@ogunmiloro 

About the differences between yout oplot and mine:

  • I NEVER use 2D input mode, ONLY 1D maple input mode.
    This is part of my preferences with CTRL+N ri open a new worksheet and not a new document.
     
  • As a consequence, even if I download a file in 2D input mode, it is interpreted as a 1D mple input mode (this is why CTRL+K/J introduces lines in 1D maple input mode).
     
  • MAPLE interprets correctly the 2D input mode part of the downloaded document. and "all goes well".
     
  • Now what happens if I YOU download my attached file while your preferences are 2D input mode and (maybe) Document instead of worksheet?
    My line 
    eval(eig, remove(has, params, varpi))

    tells MAPLE to trmove from params the variable varpi, but varpi is the string which is supposed to represent "YOUR 2D input mode varpi".
    But is not; if you use MY 1D maple input mode you must replace varpi by its "true" MathML name which is `ϖ`

    eval(eig, remove(has, params, `ϖ`))
    
  • The other solution is to rewrite my lines in 2D input mode, or more simply type this

    plot( [ eval(eig, remove(has, params, varpi)) ] , varpi = 0 .. .5, ...)

     


Here is YOUR code, not downloaded but copy-pasted in a 1D maple input worksheet, look to the "true" names of some variables and the differences between the plot commandq:

 

restart:

with(LinearAlgebra):
A := Matrix(5, 5, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = tau*`Πu`/mu, (3, 4) = 0, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = `ϖ`*`Πg`/mu}):

B := Matrix(5, 5, {(1, 1) = mu, (1, 2) = 0, (1, 3) = 0, (1, 4) = gamma, (1, 5) = 0, (2, 1) = 0, (2, 2) = mu+omega, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = mu+sigma1, (3, 4) = theta, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = alpha2+gamma+mu, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = sigma1+alpha2, (5, 4) = 0, (5, 5) = theta}):

C := A.(1/B):
Rank(C):
evs := Eigenvalues(C):
eig := op(`minus`({entries(evs, nolist)}, {0})):

B := Matrix(5, 5, {(1, 1) = mu, (1, 2) = 0, (1, 3) = 0, (1, 4) = gamma, (1, 5) = 0, (2, 1) = 0, (2, 2) = mu+omega, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = mu+sigma1, (3, 4) = theta, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = alpha2+gamma+mu, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = sigma1+alpha2, (5, 4) = 0, (5, 5) = theta}):

 
C := Matrix(5, 5, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = tau*`Πu`/(mu*(mu+sigma1)), (3, 4) = -tau*`Πu`*theta/(mu*(alpha2+gamma+mu)*(mu+sigma1)), (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = -`ϖ`*`Πg`*(sigma1+alpha2)/(mu*(mu+sigma1)*theta), (5, 4) = `ϖ`*`Πg`*(sigma1+alpha2)/(mu*(alpha2+gamma+mu)*(mu+sigma1)), (5, 5) = `ϖ`*`Πg`/(mu*theta)}):

evs := Vector(5, {(1) = 0, (2) = 0, (3) = 0, (4) = tau*`Πu`/(mu*(mu+sigma1)), (5) = `ϖ`*`Πg`/(mu*theta)}):

params := {`Πg` = 2.2, `Πu` = 3.4, `ϖ` = 0.96e-1, alpha2 = .33, mu = .2041, omega = .5, sigma1 = .72, tau = .33, theta = .9};

{`Πg` = 2.2, `Πu` = 3.4, `ϖ` = 0.96e-1, alpha2 = .33, mu = .2041, omega = .5, sigma1 = .72, tau = .33, theta = .9}

(1)

plot([eval(eig, remove(has, params, varpi))], varpi = 0 .. .5, filled = true, thickness = 4, color = [blue, red], transparency = .4);

 

plot([eval(eig, remove(has, params, `ϖ`))], `ϖ` = 0 .. .5, filled = true, thickness = 4, color = [blue, red], transparency = .4);

 

 


Download 1D_versus_2D.mw



PS: You wrote "Pig means (One of the variables in Params Pig against varpi), that is, plotting two variables (in Params) against each other"
params is a list of name=value expressions, I still don't understand what "plotting two variables (in params) against each other" could mean.

@ogunmiloro 

What is Pig?
Could you be moer explicit about the plot you'd like to see?

 

@Madhukesh J K


Hi,
A quick look to equation eq4  shows it has a singularity at eta=0:

diff(theta__p(eta), eta)= (... something...) / f(eta);
# No boundary condition at eta =0
# Fot eta=0 f(eta)=0 by definition of the boundary conditions


When one solve boundary layer equations (as you seem to fo)  with a FE method for instance, the mesh is refined as we come closer and closer to the boundary in order to avoid such singularities.

To avoid this singularity I introduced a parameter U whose value is a small strictly positive number, and used it to define the left boundary condition on theta(eta); theta(U)=1  instead of theta(U)=1.

This allows obtaining a solution with the options: 

method=bvp[midrich], maxmesh=512, abserr=1e-5

I did not go any further, but you can change these three values, , as well as the value of U, to see what happens.
Watch out, he computational time depends on the mesh size and the value of abserr.

Here is the edited worksheet
MapleOde_mmcdara_V2.mw

Here are a few results

       method=bvp[middefer], maxmesh=512, abserr=1e-4    #nok U=0.01
opt1 = method=bvp[midrich],  maxmesh=512, abserr=1e-5    # ok U=0.01
       method=bvp[midrich],  maxmesh=512, abserr=1e-4    #nok U=0.001
opt2 = method=bvp[midrich],  maxmesh=512, abserr=2e-3    # ok U=0.001

No explanation here, just a feedback
 

interface(version);
Standard Worksheet Interface, Maple 2015.2, Mac OS X, December 21 2015 Build ID 1097895

 int(the_integrand,x);

Your boundary and initial conditions are not correctly written.

A Dirichlet condition like g(1, 0)*(R - rb)/R = 0, or simply g(1, 0)=0, means that you impose that the value of g(rho, t) is zero for rho=1 AND t=0.
This is not a correct boundary condition; I guess you want to say that g(rho, t) = 0 at rho =1 FOR ANY value of t?
That is g(1, t)=0.
The same remark holds for your other conditions.

See examples, pdsolve_boundaryconditionsin the help pages for a few examples.

@VK057 

Do you mean the extrema of f, or g, or f-g?
Whatever the target function use NextZero on its derivative and discard the points which are not STRICT extrema:
For instance (please refer to my previous reply):

x1 := -8:
x2 :=  8:

r1 := NULL:
while x1 < x2 do
  x1 := RootFinding:-NextZero(x -> deq(x, 1), x1);
  #
  # x1 is a local extremum, but
  # is x1 a STRICT local extremum?
  # If it is so the first non null derivative of order >=2 must be
  # must be of even order.
  #
  p := 2:
  while deq(x1, p) = 0 do p := p+1 end do:
  if p::even then 
    #x1 is a STRICT extremum
    #
    if deq(x1, 2) <> 0 then 
      r1 := r1, [x1, `if`(deq(x1, 2) < 0, "minimum", "maximum")];
    end if:
  end if:
end do:

map(u -> if u[1] < x1 then u end if, [r1]);



 

 


 

restart

with(Student[Calculus1]):

f:=x-> (x^3+9*x^2-9*x-1)/(x^4+1):

solve(D(f)(x)=0.5):

L:=select(type,[%], realcons); # the tangency points

[.4396034712, 1.545359967, -.8928416048, -3.504544275]

(1)

pf   := plot(f(x), x=-6..6, color=red):
c    := ["blue", "cyan", "green", "gold"]:
opts := unapply([output = plot, tangentoptions=[color=c[n], legendstyle=[location=right]], caption="", showfunction=false], n):

plots:-display(
  pf, seq(Tangent(f(x), L[n], op(opts(n))), n=1..nops(L)),
  size=[600, 400]
)
   

 

 


 

Download SlightVariant.mw

You should provide an example of f and g and define whaat you mean by "significant interval" (a period?)

 

I don't know what you want to do but let me tell you about my own experience.

I often run very large computations (often on several cores of my PC or Mac) that can take hours to execute and consume several tens of Gb.
As the memory used exceeds some amount the computations are getting slower and slower due to the management of this memory the OS does.
In order to stop properly the computations in such situations I use to get periodically the amount of free memory of my machine and programmatically stop (fot instance by breaking a loop) the computations when it is too low.

With Windows (be carefull to the version) the command is GetFreePhysicalMemory
You can execute it this way

FreeMem := ssystem("GetFreePhysicalMemory)"

and decode it.
Or use

FreeMen := ssystem("GetFreePhysicalMemory ...")

where "..." stands for the option (sorry I don't have a PC right now to say you more) that will return only the info you get.

On Mac-OSX uses this

FreeMem := ssystem("vmstat)"


This is far to be perfect because the memory used also depends on the other applications that are running on the machine.
But, at least for me, the thing that matters is the total memory used and, when I launch these large computations I avoid executing other applications on my machine.

A few useful links
how-to-find-the-physical-memory-available-on-a-system-through-the-command-line
If you use Linux look here free

Doesn't know if it helps

 

 

@AmirHosein Sadeghimanesh 
Excellent point.
Have your post been an answer instead of a remark I would have voted up.

@JAMET 

I missed the expression of sys:

sys := {seq(G[i] = 0, i = 1 .. 4)}:

 

restart:

with(LinearAlgebra):

A := Matrix([[1, 1, 1, -1], [-1, 1, -1, -1], [1, -1, -1, -1], [-1, -1, 1, 3]]):

k := op(NullSpace(A)):#kernel

MatrixVectorMultiply(A, k):#check

C := op(ColumnSpace(A)):

X := <x, y, z, t>:

F := MatrixVectorMultiply(A, X) - a*C[1] - b*C[2] - c*C[2]:

G := op(convert(F, list)):

sys := {seq(G[i] = 0, i = 1 .. 4)}:
vars := [a, b, c]:
M,V := GenerateMatrix(sys, vars):
<vars> = (M^+.M).(M^+.V)

(Vector(3, {(1) = a, (2) = b, (3) = c})) = (Vector(3, {(1) = 4*x+8*y-16*t-4*z, (2) = 2*x+10*y-20*t-8*z, (3) = 2*x+10*y-20*t-8*z}))

(1)

 

 

Download sorry.mw

GenerateMatrix returns a matrix and a vector, respectively M and V in my code
 

 

@vv @tomleslie @Mariusz Iwaniuk @acer

Thank you all for your involvement.
All of your responses are brty instructive to varying degrees, both for the direct and the reverse problem.

PS: vv, the change of variable you use in K doeesn't seem to be allowed in Maple 2015 (Error, (in IntegrationTools:-Change) expected lhs of transformation equations of type And(name, Not(constant)), or (unknown) function. Received `^`), I'll try tomorrow at work with Maple 2021

3 4 5 6 7 8 9 Last Page 5 of 83