Harry Garst

234 Reputation

5 Badges

18 years, 82 days

MaplePrimes Activity


These are questions asked by Harry Garst

I am using Maple 2020.2 and it seems that the Linear Algebra package is incompatable with the Vector Calculus package:

Why not a friendly error message?
I want to use the Jacobian and the Hessian. Are there alternatives? MTM package can give a Jacobian, but no Hessian (but MTM is also tricky to use).

Harry

 

 

I was hoping to find a nice symbolic solution for the root of this equation:

a,c,d,k are parameters.
Unfortunately, I got an RootOf expression, which does not make sense to me. Assumptions do no help me further.

Next week, I have to present my results, but I don't know how to interpret is (the help file does not bring any relief). Is there something to say about the root? Suppose, I wanted to use side restriction on a problem? E.g., find a solution conditional on the fact that the derivative is zero. 


Clearly, in the plot it seems simple.

In one case there is a solution Maple provides: a  (a parameter)

This seems strange, because numerically there is one solution (and clearly not a).

restart

version(); interface(version)

 User Interface: 1502365
         Kernel: 1502365
        Library: 1502365

 

1502365

 

`Standard Worksheet Interface, Maple 2020.2, Windows 10, November 11 2020 Build ID 1502365`

(1)

f := proc (t) options operator, arrow; c/(1+exp(k*(t-a)))-c*(t-a)*k*exp(k*(t-a))/(1+exp(k*(t-a)))^2+d/(1+exp(-k*(t-a)))+d*(t-a)*k*exp(-k*(t-a))/(1+exp(-k*(t-a)))^2 end proc

proc (t) options operator, arrow; c/(1+exp(k*(t-a)))-c*(t-a)*k*exp(k*(t-a))/(1+exp(k*(t-a)))^2+d/(1+exp(-k*(t-a)))+d*(t-a)*k*exp(-k*(t-a))/(1+exp(-k*(t-a)))^2 end proc

(2)

assume(k > 0)

additionally(a > 0)

additionally(t > 0, t < 21)

about(a, k, t)

Originally a, renamed a~:
  is assumed to be: RealRange(Open(0),infinity)

Originally k, renamed k~:
  is assumed to be: RealRange(Open(0),infinity)

Originally t, renamed t~:
  is assumed to be: RealRange(Open(0),Open(21))
 

 

interface(showassumed = 0)

0

(3)

solve(f(t) = 0, t)

Warning, solve may be ignoring assumptions on the input variables.

 

(k*a+RootOf(-(exp(_Z))^4*d+(exp(_Z))^3*_Z*c-(exp(_Z))^3*_Z*d-(exp(_Z))^3*c-3*(exp(_Z))^3*d+2*c*_Z*(exp(_Z))^2-2*(exp(_Z))^2*_Z*d-3*c*(exp(_Z))^2-3*d*(exp(_Z))^2+c*_Z*exp(_Z)-d*_Z*exp(_Z)-3*c*exp(_Z)-d*exp(_Z)-c))/k

(4)

[allvalues(%)]

[(k*a+I*Pi+(2*I)*Pi*_Z1)/k, (k*a+RootOf(-d*(exp(_Z))^2+c*_Z*exp(_Z)-d*_Z*exp(_Z)-c*exp(_Z)-d*exp(_Z)-c))/k]

(5)

Re([op(%)][1])

a

(6)

Re([op(`%%`)][2])

(k*a+Re(RootOf(-d*(exp(_Z))^2+c*_Z*exp(_Z)-d*_Z*exp(_Z)-c*exp(_Z)-d*exp(_Z)-c)))/k

(7)

a := 'a'; b := 'b'; c := 'c'; d := 'd'; k := 'k'; t := 't'

a

 

b

 

c

 

d

 

t

(8)

Now, numerically:

b := 40; k := .3; a := 10; c := 2.8; d := -1.5

40

 

.3

 

10

 

2.8

 

-1.5

(9)

RealDomain:-solve(f(t) = 0, t)

11.02361521

(10)

plot(f(t), t = 0 .. 20, color = "DarkBlue", thickness = 2)

 

``


 

Download Please_NO_RootOf.mw

The last months Maple 2020 suffers from frozen interface behavior:

I simply wanted to save a file, but that resulted in a frozen window:

After 10 minutes the file explorer window appeared, but also this screen is unresponsive.

I reinstalled Maple last month, but that didn't help. Remarkably, the problem comes and goes. It seems to me that some java problem is making my life difficult.
Any ideas?
kind regards,

Harry

 

ps I ran the process monitor of Sysinternals, but I have no idea if this has any relevance to the problems:

11460 RegOpenKey HKCR\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\PackageRepository\Extensions\windows.protocol\Maple.cwmaple.2020 NAME NOT FOUND Desired Access: Read

11460 ReqQueryValue HKCR\Maple.cwmaple.2020\URL Protocol NAME NOT FOUND Length: 12

11460 RegOpenKey HKCU\Software\Classes\Maple.cwmaple.2020  NAME NOT FOUND Desired Access: Maximum Allowed

I have been using Alex Potapchik & & Alec Mihailovs' procedure for generating a multivariate sample

https://www.mapleprimes.com/questions/37539-Generate-Data-From-A-Multivariate-Normal

How can I plot the eigenvectors in the 3D scatterplot?

``

restart

kernelopts(version); interface(version)

`Maple 2019.2, X86 64 WINDOWS, Nov 26 2019, Build ID 1435526`

 

`Standard Worksheet Interface, Maple 2019.2, Windows 10, November 26 2019 Build ID 1435526`

(1)

with(LinearAlgebra); with(Statistics); with(plots)

MultivariateNormalSample := proc (Sigma, V, N) local d; d := LinearAlgebra:-Dimension(V); LinearAlgebra:-LUDecomposition(Matrix(Sigma, datatype = float[8]), 'method' = 'Cholesky').ArrayTools:-Alias(Statistics:-Sample(Normal(0, 1), d*N), [d, N])+ArrayTools:-Replicate(Vector[column](V, datatype = float[8]), 1, N) end proc

Cov := Matrix([[4, 2.5, .4], [2.5, 2, .2], [.4, .2, .5]])

Cor := simplify(MatrixPower(DiagonalMatrix(Diagonal(Cov)), -1/2).Cov.MatrixPower(DiagonalMatrix(Diagonal(Cov)), -1/2))

S := MultivariateNormalSample(Cov, `<,>`(0, 0, 0), 1000); Statistics:-CovarianceMatrix(S^%T); map(Statistics:-Mean, [S[1], S[2]])

Determinant(Cov)

.795

(2)

Z := Scale(S^%T)

E, V := Eigenvectors(Cor)

E := Re(E); V := Re(V)

Vector(3, {(1) = 2.0005950859349144, (2) = .11194337607751015, (3) = .8874615374875758})

 

Matrix(%id = 18446746188592589870)

(3)

plots:-pointplot3d(Z, axes = normal, thickness = 1, symbol = circle, axis[1] = [color = black], axis[2] = [color = blue], axis[3] = [color = green], color = "DarkRed", orientation = [30, 75], viewpoint = "circleright", symbolsize = 1)

 

NULL

 

Download Plot_eigenvectors_in_3d_scatterplot.mw

I had expected that applying the power rule for exponents would lead to an answer of zero. Maple refuses to give the desired answer, but using a procedure it works as expected.

Did I miss something?
 

``

restart

kernelopts(version)

`Maple 2019.2, X86 64 WINDOWS, Nov 26 2019, Build ID 1435526`

(1)

interface(version)

`Standard Worksheet Interface, Maple 2019.2, Windows 10, November 26 2019 Build ID 1435526`

(2)

simplify(exp(k*(ln(t)+ln(a)))-(exp(ln(t)+ln(a)))^k, symbolic)

exp(k*(ln(t)+ln(a)))-t^k*a^k

(3)

W := proc (m, n) local r; r := simplify(exp(m*n)-(exp(m))^n, symbolic); return r end proc

W(n, k)

0

(4)

subs(n = ln(t)+ln(a), W(n, k))

0

(5)

V := proc (m, n) local r; r := simplify((exp(m))^n, symbolic); return r end proc

V(n, k)

exp(k*n)

(6)

V(ln(t)+ln(a), k)

t^k*a^k

(7)

``


 

Download mapleprimes.mw

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