MaplePrimes Questions

Hi to All!

I have an equation including 6 parameters; k_1, k_2, k_3, l_1, l_2, l_3 and a constant a_1. I want to solve this equation for l_1, l_2, and l_3. I get a solution as can be seen in the link but I wonder if there is a solution such that l_j is written in terms of k_j and a_1, j=1,2,3. I mean can be put a restriction on a parameter such that it depends to specific parameters?

Thank you in advance.

Regards,

question.mw

How can I import my data from my Ms word document to a Maple work sheet. Iam finding it difficult to save my work as a Dat file. Something like this example below

 

Data:=readdata("c:/Users/kokoge00/Desktop/methods.dat",float,10);
Data := [[0.1, 0.0769540597, 0.1477783335, 0.1393069312

  0.0763361154, 0.1477867626, 0.1393072151, 0.0763361266

  0.1477867830, 0.1393071934], [0.3, 0.1093424148, 0.1120401102

  0.1509302274, 0.1072278404, 0.1121142033, 0.1509369166

  0.1072278479, 0.1121142168, 0.1509369024], [0.5, 0.1392030568

  0.0853083077, 0.1558066181, 0.1353291378, 0.0855066806

  0.1558355785, 0.1353291558, 0.08550671332, 0.1558355439], [0.7, 

  0.1662374563, 0.0652194693, 0.1562235596, 0.1604342222

  0.0655908735, 0.1562974878, 0.1604342352, 0.06559089617, 

  0.1562974637], [0.9, 0.1903821623, 0.0500537619, 0.1537887672

  0.1825594352, 0.0506356391, 0.1539346707, 0.1825594528

  0.05063567192, 0.1539346352], [1.1, 0.2117168860, 0.0385555127

  0.1496220815, 0.2018541863, 0.0393727175, 0.1498707561

  0.2018542024, 0.03937274753, 0.1498707234], [1.3, 0.2303874000

  0.0298096396, 0.1444864012, 0.2185409755, 0.0308687065

  0.1448804021, 0.2185409880, 0.03086872986, 0.1448803765], [1.5, 

  0.2465077820, 0.0231661161, 0.1388614678, 0.2328759081

  0.0244336214, 0.1394893808, 0.2328759200, 0.02443364533, 

  0.1394893543]]
 

How can we manage them?

During the last few days
@Rana47 https://www.mapleprimes.com/questions/236758-HPM-Error-Invalid-Input
@SHIVAS https://www.mapleprimes.com/questions/236755-How-To-Run-Or-Implement-HPM-Method-In-Maple
@Madhukesh J K https://www.mapleprimes.com/questions/236747-Error-In-The-Program-HPM

have both asked a similar question on the same topic (HPM) and uploaded both quite the same code (same name of variables, same commands and same syntax errors).
This reveals an obvious close proximity of these three OP.

Given the extreme resemblance of the three threads, my guess is that there is a single person behind those three login names who expects that asking the same question from different login names will prevent the moderators from moving the new thread to an old one, and thus keeping his question in the foreground?

Am I on the wrong track (in which case I humbly ask the three OPs to excuse my words[1])
If not, how can we prevent this type of behaviour?

[1] but, as it is likely that they are then close colleagues from the same lab they should coordinate not to ask the same question three times.

Why does Maple 2023.x not evaluate to Phi := -b in the following example?

> restart:
> z:=-a*exp(-I*b):
> Phi:=simplify(evalc(argument(z)));
               Phi := arctan(a sin(b), -a cos(b))

Since Maple forms the main value of arctan(y, x), would have to be
Phi=arctan(a sin(b), -a cos(b))=arctan((a sin(b))/(-a cos(b)))=arctan(-tan(b))=-b.

Is the full evaluation not implemented for some reason or what did I miss?

Hi everyone, I am trying to reproduce the results using the HPM method in Maple for ODE. Later, will use these results for my original problem.  The problem has power N as an exponent; when I fixed N some to a numeric number, then I get some equation, but this equation is not similar as reported in the paper, I do not want to fix N to some numeric number.  I am attaching my Mplae worksheet and some pictures of the problem that I want to reproduce. Could anyone help me reproduce all the equations as it is reported in the paper, please have a look at my worksheet. There are 4 pictures, and their name is according to sequence .....................

HPM-Help.mw

 

I installed Maple 2023.1 update and immediately noticed a problem with the worksheet editor.

Specifically, the editor seems to be replacing "<" with "!" in the maple code. I first noticed the problem with code copied from the maple code editor into a worksheet, but then noticed the same problem with code on another worksheet which was loaded from file. Thus, it seems the problem is actually in the worksheet editor and not the copy paste function.  Note that the problem occurred immediately on reloading files after I restarted maple from the update. Normally, when this occurs, it starts after Maple has been loaded for an hour or more. Fortunately, when I restarted Maple and reloaded files, the problem seems to have cleared itself.

I have attached images showing the maple screen with the error, and also the specific code copied from the code editor to a worksheet for comparison.  I have also attached the worksheets in which I saw the problem. For now my goto workaround is to save and restart because the problem does not seem to corrupt the actual files even when I save them.

 

Attachments: chain.mw  chain2.mw

Mathematica has a benchmarking package that allows you to evaluate your computer's performance with respect to other computers with different specs.
I was wondering if there was a similar script/package for maple?

Hi dear users!

I hope everyone is fine here. I want to compute the NULL SPACE vector V2[1], V2[2], V2[3],... of matrices MatrixEquationAgain2[1], MatrixEquationAgain2[2], MatrixEquationAgain2[3]... for different values of M. Kindly see my attached file where I struggled a lot but failed to evaluate it. Kindly help me to compute it. Thanks in advance

NULL_SPACE.mw

According to print - Maple Help (maplesoft.com),

calling print[N] instead of print where N is an integer between -2 and +3, temporarily overrides the prettyprint interface variable.

However, I find that 

print[-2]();
Error, prettyprint must be an integer in the range 0..3
print[-1]();
Error, prettyprint must be an integer in the range 0..3

Also, 

interface(prettyprint = -2);
Error, (in interface) prettyprint must be an integer in the range 0..3
interface(prettyprint = -1);
Error, (in interface) prettyprint must be an integer in the range 0..3

Did I miss something?

Dear experts

I am interested in solving the following differential equation numerically

diff(eta(k,t),t,t) + gamma*diff(eta(k,t),t) + omega^2*eta(k,t) + (3/4)*k*omega*eta(k,t)*eta(k,t) + (3/2)*k*eta(k,t)*(omega*eta(k,t) + (3/4)*k*eta(k,t)*eta(k,t)) + (omega*gamma*eta(k,t) + (3/2)*k*eta(k,t)*(gamma*eta(k,t)))*(diff(eta(k,t),t) + gamma*eta(k,t))/(omega*eta(k,t) + (3/4)*k*eta(k,t)*eta(k,t)) = 0;

where eta(x,t) is the Fourier transform of zeta(x,t) and plot of zeta(x,t) is the goal. I think FFT method can help but I failed in running and applying this method on the equation above.
Initial conditions are

f= 0.28
C = 1/L*0.2/f*tanh(L/f)
L=20
amp = 0.5e-2
zeta0 = amp/cosh(f*x)/cosh(f*x)-C

and u0 as initial velocity can be 0 or an arbitrary function such as 
u0 =2*amp/cosh(f*x)/cosh(f*x)*f*tanh(f*x)

I would appreciate it if one could help me.

How do I add the solve command to the end?

Download Zakobi.mw

I am getting errors while applying the HPM method.
I have attached the maple file.

HPM.mw

Please help me to get the solution.

Thanks in advance.

I'd like to reproduce Initial Value DDE of Neutral Type in Maple.
The differential equation is: 

deq := D(y)(t) = 2*cos(2*t)*y(t/2)^(2*cos(t)) + ln(D(y)(t/2)) - ln(2*cos(t)) - sin(t): # with y(0) = 1 and known D(y)(0)

Unfortunately, if I type valid initial values, Maple will simply generate , and yet if I just give a partial initial condition, Maple will display and only return incorrect results. 
 

restart;

interface(version)

`Standard Worksheet Interface, Maple 2023.1, Windows 10, July 7 2023 Build ID 1723669`

(1)

deq := (D(y))(t) = 2*cos(2*t)*y((1/2)*t)^(2*cos(t))+ln((D(y))((1/2)*t))-ln(2*cos(t))-sin(t)

RealDomain:-solve(subs(t = 0, y(0) = 1, deq), (D(y))(0))

2, -LambertW(-2*exp(-2))

(2)

dsolve({deq, y(0) = 1, (D(y))(0) = (2, -LambertW(-2*exp(-2)))[1]}, 'numeric', 'delaymax' = Pi, 'range' = 0 .. 2*Pi)

Error, (in dsolve/numeric/DAE/initial) too many initial conditions, the following are not needed: {D(y)(0) = 2}

 

dsolve({deq, y(0) = 1, (D(y))(0) = (2, -LambertW(-2*exp(-2)))[2]}, 'numeric', 'delaymax' = Pi, 'range' = 0 .. 2*Pi)

Error, (in dsolve/numeric/DAE/initial) too many initial conditions, the following are not needed: {D(y)(0) = -LambertW(-2*exp(-2))}

 

dsn := dsolve({deq, y(0) = 1}, 'type' = 'numeric', 'delaymax' = Pi, 'range' = 0 .. 2*Pi)

plots['odeplot'](dsn, 0 .. 2*Pi)NULL

Warning, cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up

 

`[Length of output exceeds limit of 1000000]`

 

Warning, cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up

 

 


 

Download ndelay.mw

The output is wrong. Note that "y(0) = 1" is insufficient to uniquely specify a solution, as "D(y)(0)" can be either -LambertW(-2/exp(2)) or 2. But Maple does not allow sufficient constraints here. How do I avoid such an unexpected behavior?

Hi,

I wonder about how to generate the classical table of the standard normal distribution. Ideas ?

Many thanks

 

Here is a test: 

For small matrices, apart from the first call, the performance is almost perfect (🎉!). 
As a comparison, an equivalent test may be performed in modern Python:

As you can see, for 1024×1024, 2048×2048, 4096×4096, 8192×8192, and 16384×16384 matrices, Maple's performance gets pretty poor. Is the FFT procedure not well optimized for larger matrices? I do have read the Fourier Transforms in Maple, yet I cannot find any information on this subject. 
In accordance with the following output 

showstat(DiscreteTransforms::FFT_complex8, 3):

FFT_complex8 := proc()
       ...
   3   :-DiscreteTransforms:-FFT_complex8 := LinkExternal('hw_FFT',2003);
       ...
end proc

it appears that the code hasn't been developed for 20 years. Is it possible to improve the performance of the FFT built into Maple in order that the computation on such a 2¹⁴×2¹⁴ matrix can be achieved in about twenty seconds (rather than in two minutes)?

Note. For these matrices, exact transform results (see below) can be obtained symbolically.

for n from 0 to 12 do
    m := LinearAlgebra:-HankelMatrix(<$ (1 + 1 .. 2**n + 2**n)>, datatype = complex[8], shape = []): gc();
    print(n, andseq(abs(_) < HFloat(1, -10, 2), _ in SignalProcessing:-FFT(m, normalization = none, inplace = true) - Matrix(2^n, <2^(2*n)*(2^n + 1), <'2^(2*n - 1)*(:-cot((k - 1)/2^n*Pi)*I - 1)' $ 'k' = 1 + 1 .. 2^n>>, shape = symmetric, storage = sparse, datatype = complex[8])) (* faster than `rtable_scanblock` and `ArrayTools:-IsZero` and much faster (🎊!) than `comparray` and `verify/Matrix` with testfloat *) )
od:
 = 
                            0, true

                            1, true

                            2, true

                            3, true

                            4, true

                            5, true

                            6, true

                            7, true

                            8, true

                            9, true

                            10, true

                            11, true

                            12, true

However, the main goal is to test the numerical efficiency of Maple's fast Fourier transform algorithm.

First 182 183 184 185 186 187 188 Last Page 184 of 2427