MaplePrimes Questions

Whilst trying to debug another problem on this site, this one

https://www.mapleprimes.com/questions/225688-How-To-Compute-Inverse-Of-A-Matrix-For

I came across a Maple bug(?) which was so serious, I thought either

  1. I'm being more than usually dim
  2. it needs it's own entry here, so that others can check

Problem can be summarized as:

When using 2D input, can the '.' character be used for simple matrix multiplication???? Because it isn't working for me!

Entering the '.' character places a bold, midline dot between the two arguments, but executing the result gives "Error unable to parse". Converting to 1-D input, no issues - everything works as expected.I should also point out that

  1. I never normally use 2D-input for my own work
  2. the attached worksheet executes correctly in Maple 2017.3, X86 64 WINDOWS, Sep 13 2017, Build ID 1262472.

If this is reproducible then wtf!

restart; with(LinearAlgebra); kernelopts(version)

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

(1)

A := RandomMatrix(2, 2); B := RandomMatrix(2, 2)

Matrix(2, 2, {(1, 1) = 44, (1, 2) = -31, (2, 1) = 92, (2, 2) = 67})

 

Matrix(%id = 18446744074378134462)

(2)

A.B

Error, unable to parse

"A*B;"

 

LinearAlgebra:-Multiply(A, B)

Matrix(%id = 18446744074378136502)

(3)

A:= RandomMatrix(2, 2);
B:= RandomMatrix(2, 2);
A.B

Matrix(2, 2, {(1, 1) = -32, (1, 2) = -4, (2, 1) = -74, (2, 2) = 27})

 

Matrix(2, 2, {(1, 1) = -93, (1, 2) = -72, (2, 1) = -76, (2, 2) = -2})

 

Matrix(%id = 18446744074378132406)

(4)

 

Download matMulProb.mw

I'm start making an homepage about mathematic and wondt to link a workpage writen in Maple 16 into WP, thanks to whose ho have any idea :)

 

Hello,

I have a set of nonlinear equations (transcendental) containing variables and one free parameter. I want to solve this system for variables while varying parameter's value. I have tried with fsolve and solve commands keeping fixed the parameter value, but they are not solving yet. Is there any way to solve this system for a range of parameter's value.
The systmem is like this, x,y,z are the variables and 'a' is the parameter:
f1(x,y,z,a)=0,
f2(x,y,z,a)=0,
f3(x,y,z,a)=0.

Many thanks in advance.

Hi,

I submit you this strange result:
for somenumerical  values of a, b, c  (a, b, c real and b > a), Maple 2018 is not able to compute the mean of
c*U where U is a Uniform random variable with support [a, b].


 

restart:

with(Statistics):

interface(version);

`Standard Worksheet Interface, Maple 2018.0, Windows 7, March 10 2018 Build ID 1298750`

(1)

z := .4070716688*RandomVariable(Uniform(0.12-0.02*0.12, 0.12+0.02*0.12));
Mean(z);

.4070716688*_R

 

Error, (in Statistics:-Mean) the expression does not have a taylor expansion at t = 0

 

z := .4070716688*RandomVariable(Uniform(a, b));
Mean(z);
subs({a=0.12-0.02*0.12, b=0.12+0.02*0.12}, %);

.4070716688*_R0

 

.2035358344*a+.2035358344*b

 

0.4884860026e-1

(2)

 


 

Download Mean.mw


PLEASE: Maple still fails if I replace  a = 0.12 -0.02*0.12 by its value 0.1174
                                                                       and b = 0.12+0.02*0.12 by its value 0.1224
                   

This is incomprehensible and could hide a more profound problem.

Good day everyone,

I am trying to write HAM code for coupled ODE but getting errors like "table(...)" or

 

"Error, (in dsolve) found the independent variables {eta} also present in the names of the functions of the system {(diff(diff(diff((table( [( 0 ) = proc (eta) options operator, arrow, function_assign; eta*exp(-eta)-F[w] end proc ] ))(eta), eta), eta), eta))(f[1](eta)), (diff(diff((table( [( 0 ) = proc (eta) options operator, arrow, function_assign; exp(-eta) end proc ] ))(eta), eta), eta))(theta[1](eta)), (diff((table( [( 0 ) = proc (eta) options operator, arrow, function_assign; eta*exp(-eta)-F[w] end proc ] ))(eta), eta))(f[1](eta)), ((table( [( 0 ) = proc (eta) options operator, arrow, function_assign; exp(-eta) end proc ] ))(eta))(theta[1](eta))}"

 

Anyone with useful informations should please help.

Thank you.

Below is the attached of the file

untitled22222.m

Does Maple have a way to upload a screenshot of a worksheet or a savefile of a worksheet to MaplePrimes?

Hi.

How I can Plot voltage (v) versus time (t) in nonlinear differential equation.

if possible please provide a simple example for me. for instance the command that I must use!!

plot.pdf

Hello everyone, i've a problem working with Maple because i have a really big system of equations and for everything that i have to do with them, for example, collect terms, coefficients, take a lot of time from me. The problem it is when, for example, i wait 30 minutes to take the coefficients from a equation and in the next command Maple might stop, then i have to close and start all over again... My question it is if have anyway to save my file in a way that if i close and re open i dont have to compile all again. Maybe this is pretty obvious but i really dont know how to do it, because if i close my work and open again, i have to compile everything again.

Following creates a list of 10 numbers 1..10:

  L := []; for i from 1 to 10 do L := [op(L), i] end do;

Now suppose I have equations labelled (1) ... (10). Can I place these equations into a list by some analogy of the above code using the label references?

 

 

Y = (-2*k^3+6*k^2+sqrt(k^8-12*k^7+64*k^6-198*k^5+448*k^4-636*k^3+369*k^2)-7*k-15)/((k^3-3*k^2+5*k-15)*(1+k))

I am in the process fo creating 2 sets of multivariable expressions and I need to create pairwise equations from these sets.

L={L1(a_1 .. a_n), L2(a1, .., an) .... }

R={R1(a_1 .. a_n), R2(a1, .., an) .... }

I need to create the array:

M=Array(1..(2c)!, 1..2^c) where the elements are:

L[1] = R[1],   L[1] = R[2],   L[1] = R[3] ...
L[2] = R[1],   L[2] = R[2],   L[2] = R[3] ...
L[3] = R[1], ...


I then need to pull out particular elements (equtions M[1,1], M[7,2], etc) from the array and plug in a lot of values for the variables of that equation

for a[1] from 1 to 10 do
   for a[2] from 1 to a[1] do
       for a[3] from 1 to a[2] do
if Equation holds (store the inputs somewhere)
end do
end do
end do


I last used Maple about 5 years and have since forgotten a lot, so any and all help is greatly appreciated.
Thanks, Ben

Hello,

I have created my own costume package inspired from an already existing one but this package relies and uses many functions from the original package which I used to create mine. The question: is there an easy way to automatically import all the needed functions and commands from the original package without having to write the name of the original package followed by the name of each function or command ( which is really laborious and hard to complete) ?

Thank you

I have a eigenvalue problem like:

[FF1]* {w}=N^2 *[FF2] *{w}

[FF1] and [FF2] are a*b matrices (non square matrix) , {w} are vectors(eigenvectors) and the values of N are eigenvalues.

I want to obtain eigenvalues and eigenvectors by computing Moore-Penrose pseudo-inverse of [FF2] and do the procedures below :

[FF2]^-1 * [FF1] *{w} =N^2 *{w}            ,        (assume  [FF2]^-1   is Moore-Penrose pseudo-inverse of [FF2]   )

[FF2]^-1 * [FF1] = [FF3]  ,  ( [FF3] is a b*b matrix- squre matrix) 

so  [FF3] *{w}=N^2 *{w}

then I can use LinearAlgebra[Eigenvectors](FF3) to get eigenvalues and eigenvectors. 

I know that Moore-Penrose pseudo-inverse of [FF2] * [FF1] isn't equal to Identity matrix. [FF2]^-1 * [FF1] <> [ I ] . But assume it can be. ( I have a solution for this problem) . 

My biggest problem is [FF2] and [FF1] are large-scale sparse matrix and it takes hours or several days that maple can compute Moore-Penrose pseudo-inverse of [FF2]  and also LinearAlgebra[Eigenvectors](FF3). 

Main question : can I compute Moore-Penrose pseudo-inverse and LinearAlgebra[Eigenvectors]  by using Parallel Programming?  if the answer is yes , how? give me an example please.

if the answer is No , is there any way (any algorithm) to find the inverse of a large non-sqaure matrix or eigenvalues of a large matrix faster?

please introduce some books for parallel programming in maple or general.

Thanks.

1.mw

Copied this from a webpage but it gives an error.

Grateful for all suggestions


PrintfError.mw


 

H := (alpha*(2-beta)*S__0^2+2*D*(S^(2-beta)-S__0^(2-beta)))/(2*D*alpha*(2-beta))

T := (S^(-beta+1)-S__0^(-beta+1))/(alpha*(-beta+1))+S__0/D

NULL

NULL

NULL

Profit1 := ((s-C)*S-C__1*H-C__3)/T

((s-C)*S-(1/2)*C__1*(alpha*(2-beta)*S__0^2+2*D*(S^(2-beta)-S__0^(2-beta)))/(D*alpha*(2-beta))-C__3)/((S^(-beta+1)-S__0^(-beta+1))/(alpha*(-beta+1))+S__0/D)

(1)

NULL

Profit1 := subs(D = alpha*S__0^beta, Profit1)

((s-C)*S-(1/2)*C__1*(alpha*(2-beta)*S__0^2+2*alpha*S__0^beta*(S^(2-beta)-S__0^(2-beta)))/(alpha^2*S__0^beta*(2-beta))-C__3)/((S^(-beta+1)-S__0^(-beta+1))/(alpha*(-beta+1))+S__0/(alpha*S__0^beta))

(2)

NULL

Profit1 := eval(Profit1, [alpha = 5, S__0 = 28, C__1 = .5, C__3 = 10])

((s-C)*S-0.1000000000e-1*(7840-3920*beta+10*28^beta*(S^(2-beta)-28^(2-beta)))/(28^beta*(2-beta))-10)/((1/5)*(S^(-beta+1)-28^(-beta+1))/(-beta+1)+(28/5)/28^beta)

(3)

DEF_Profit1 := diff(Profit1, S)

(s-C-.1000000000*S^(2-beta)/S)/((1/5)*(S^(-beta+1)-28^(-beta+1))/(-beta+1)+(28/5)/28^beta)-(1/5)*((s-C)*S-0.1000000000e-1*(7840-3920*beta+10*28^beta*(S^(2-beta)-28^(2-beta)))/(28^beta*(2-beta))-10)*S^(-beta+1)/(((1/5)*(S^(-beta+1)-28^(-beta+1))/(-beta+1)+(28/5)/28^beta)^2*S)

(4)

NULL

NULLNULL

``

``

sol1 := solve(DEF_Profit1, S)

RootOf(-100*_Z^(-beta+1)*28^beta*beta^2+300*_Z^(-beta+1)*28^beta*beta-10*C*_Z^(2-beta)*28^beta*beta^2+10*_Z^(2-beta)*28^beta*beta^2*s+20*C*_Z^(2-beta)*28^beta*beta-20*_Z^(2-beta)*28^beta*beta*s+_Z^(3-2*beta)*196^beta*7^(-beta)-200*28^beta*_Z^(-beta+1)+28*_Z^(2-beta)*beta^2-392*_Z^(-beta+1)*beta^2-56*_Z^(2-beta)*beta+392*_Z^(-beta+1)*beta+280*C*_Z*beta^2-280*_Z*beta^2*s-560*C*_Z*beta+560*_Z*beta*s)

(5)

NULL

NULL

NULL

NULL

NULL

``


 

Download doubt_case.mw

First 645 646 647 648 649 650 651 Last Page 647 of 2308