Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

I am trying to see if I can get speed up by using dsolve inside thread.

I made very simple example of global list of two differential equations to start with.

Next, created two threads where each picks one ode from the global list to process. So they should in theory run in parallel. The list of ode's is a global list in the worksheet for now.

But I keep getting error when calling dsolve 

               Error, (in dsolve) type `System` does not exist

I tried also passing the actual ode to the thread, still, same error.

Next, I did not pass anything, but called dsolve directly from inside thread proc on same ode. The ode is local variable inside the proc. I still get same error.

                        Does this mean dsolve is not supported by threads? 

But when I searched this subject, AI says it works in threads:

 

Everything works OK when I run dsolve in worksheet outside thread (i.e. normally).

I will show below worksheet showing these cases. I must not be doing something right. But what? Can one not pass data from global worksheet to the thread this way? Or does one needs to load something in each thread to make this work?

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1840 and is the same as the version installed in this computer, created 2024, December 2, 10:11 hours Pacific Time.`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

Example 1. Passing index of list to thread

 

restart;

g_list:=[sin(t)*diff(x(t),t$2)+cos(t)*diff(x(t),t)+2*x(t)=0,
         diff(y(x),x)=lambda*sin(lambda*x)*y(x)^2+a*cos(lambda*x)^n*y(x)-a*cos(lambda*x)^(n-1)]:

work_func:=proc(i::posint)  
  :-dsolve(g_list[i]):
end proc:

Threads:-Wait(  seq( Threads:-Create( work_func(i)), i=1..2) );

Error, (in dsolve) type `System` does not exist

Example 2. Passing actual ode itself to thread

 

restart;

g_list:=[sin(t)*diff(x(t),t$2)+cos(t)*diff(x(t),t)+2*x(t)=0,
         diff(y(x),x)=lambda*sin(lambda*x)*y(x)^2+a*cos(lambda*x)^n*y(x)-a*cos(lambda*x)^(n-1)]:

work_func:=proc(ode::`=`)  
  :-dsolve(ode):
end proc:

Threads:-Wait(  seq( Threads:-Create( work_func(g_list[i])), i=1..2) );

Error, (in dsolve) type `System` does not exist

 

Example 3. Normal processing. No threads

 

restart;

g_list:=[sin(t)*diff(x(t),t$2)+cos(t)*diff(x(t),t)+2*x(t)=0,
         diff(y(x),x)=lambda*sin(lambda*x)*y(x)^2+a*cos(lambda*x)^n*y(x)-a*cos(lambda*x)^(n-1)]:

work_func:=proc(ode::`=`)  
  :-dsolve(ode):
end proc:

for item in g_list do
    work_func(item);
od:

#no error

 

Example 4. do not pass anything. Just call dsolve

 

restart;

work_func:=proc(i::posint)  
  local x,t;
  local ode:=sin(t)*diff(x(t),t$2)+cos(t)*diff(x(t),t)+2*x(t)=0;
  :-dsolve(ode):
end proc:

Threads:-Wait(  seq( Threads:-Create( work_func(i)), i=1..2) );

Error, (in dsolve) type `System` does not exist

 

 

 

Download error_dsolve_using_threads_dec_26_2024.mw

restart;

Here are the graphs of a parabola and a straight line:

plots:-display(
        plot(x^2, x=-1..1),
        plot((x+1)/2, x=-1..1),
color=["Red","Green"]);

 

Suppose I want to plot the part of the parabola that lies below

the straight line, and suppose, just to be nasty, I choose to do it

with implicitplot:

plots:-implicitplot(y=x^2, x=-1..1, y=0..(x+1)/2);

 

That is not a parabola at all.  [And where does the "ynew" label come from?]

 

This behavior was introduced in Maple 2022.

In Maple 2021 we get the expected result:

plots:-implicitplot(y=x^2, x=-1..1, y=0..(x+1)/2);


 

Download mw.mw

I cannot find any examples of how to raise the software memory limits to maximum with the mentioned  -T switch in the manual to avoid memory allocation error popup.

Neither are there any examples posted on the web.

It cannot be a hardware allocation error, as the system memory is large.

So how is the -T switch implimented

Hello everyone,

I'm quite new to Maple Flow and I really like it. However, since the 2024.2 update, Flow sometimes does not let me save a worksheet. Just nothing happens when I click Save or Save As or press Ctrl+S. Same thing when I click "Yes" in the dialogue (which asks me if I want to save the changes) after I close the worksheet.

As a workaround in these cases, I copy the whole content of the worksheet, close Flow altogether and open a new worksheet into which I paste the previously copied contents. Am I the only one experiencing this behaviour? Am I doing something wrong?

2024-12-20_Q_simplification_Question.mw
Solve the general cubic. Apply values and simplify. 

Could someone show how Maple simplifies to the value of X=3? I tried doing it manually and I could not figure it out. 

Also is there a Help assistant to see the setps?

restart

 

 

X^3+a*X=b

X^3+X*a = b

(1)

 

 

sol:=solve(X^3+a*X=b,[X])

[[X = (1/6)*(108*b+12*(12*a^3+81*b^2)^(1/2))^(1/3)-2*a/(108*b+12*(12*a^3+81*b^2)^(1/2))^(1/3)], [X = -(1/12)*(108*b+12*(12*a^3+81*b^2)^(1/2))^(1/3)+a/(108*b+12*(12*a^3+81*b^2)^(1/2))^(1/3)+((1/2)*I)*3^(1/2)*((1/6)*(108*b+12*(12*a^3+81*b^2)^(1/2))^(1/3)+2*a/(108*b+12*(12*a^3+81*b^2)^(1/2))^(1/3))], [X = -(1/12)*(108*b+12*(12*a^3+81*b^2)^(1/2))^(1/3)+a/(108*b+12*(12*a^3+81*b^2)^(1/2))^(1/3)-((1/2)*I)*3^(1/2)*((1/6)*(108*b+12*(12*a^3+81*b^2)^(1/2))^(1/3)+2*a/(108*b+12*(12*a^3+81*b^2)^(1/2))^(1/3))]]

(2)

vals:=[a=6,b=45]

[a = 6, b = 45]

(3)

Nans:=(map(eval,sol,vals))

[[X = (1/6)*(4860+12*166617^(1/2))^(1/3)-12/(4860+12*166617^(1/2))^(1/3)], [X = -(1/12)*(4860+12*166617^(1/2))^(1/3)+6/(4860+12*166617^(1/2))^(1/3)+((1/2)*I)*3^(1/2)*((1/6)*(4860+12*166617^(1/2))^(1/3)+12/(4860+12*166617^(1/2))^(1/3))], [X = -(1/12)*(4860+12*166617^(1/2))^(1/3)+6/(4860+12*166617^(1/2))^(1/3)-((1/2)*I)*3^(1/2)*((1/6)*(4860+12*166617^(1/2))^(1/3)+12/(4860+12*166617^(1/2))^(1/3))]]

(4)

simplify(Nans)

[[X = 3], [X = (1/4)*(I*3^(1/2)*(180+44*17^(1/2))^(2/3)+(8*I)*3^(1/2)-(180+44*17^(1/2))^(2/3)+8)/(180+44*17^(1/2))^(1/3)], [X = -3/2-((1/2)*I)*51^(1/2)]]

(5)
 

 

Download 2024-12-20_Q_simplification_Question.mw

This text is typed directly into the browser. I can now change the font size to something bigger. I can also change the font from Default to something else.

This text in Calibri 11 was pasted from Word. What do I have to do to change it to MaplePrimes default font (which I have used above)? Selecting default from 

does not work because default is already selected when I put the cursor into the pasted text.

What is the default font type by the way? Can I change it permanetly?

All on Windows 10 and with Firefox.

Hi

If possible, please help me write the steps to solve the following equation.

By setting the coefficients of the same power (Yi) on both sides of equation equal, we solution get

This is my first time working with plotting data from a matrix. However, with the help of a friends on MaplePrimes, I learned how to plot the data in both Maple and MATLAB. Despite this, I am having trouble with visualization. When I change the delta value, my function experiences vibrations or noise, which is clearly visible in the plot. But when I change delta, I encounter errors with my matrix data. How can I fix this problem? and there is any way for get better visualization by Explore ? also How show this vibration or noise in 2D?

restart;

randomize():

local gamma;

gamma

(1)

currentdir(kernelopts(':-homedir'))

NULL

T3 := (B[1]*(tanh(2*n^2*(delta^2-w)*k*t/((k*n-1)*(k*n+1))+x)-1))^(1/(2*n))*exp(I*(-k*x+w*t+delta*W(t)-delta^2*t))

(B[1]*(tanh(2*n^2*(delta^2-w)*k*t/((k*n-1)*(k*n+1))+x)-1))^((1/2)/n)*exp(I*(-k*x+w*t+delta*W(t)-delta^2*t))

(2)

NULL

params := {B[1]=1,n=2,delta=1,w=1,k=3 };

{delta = 1, k = 3, n = 2, w = 1, B[1] = 1}

(3)

NULL

insert numerical values

solnum :=subs(params, T3);

(tanh(x)-1)^(1/4)*exp(I*(-3*x+W(t)))

(4)

CodeGeneration['Matlab']('(tanh(x)-1)^(1/4)*exp(I*(-3*x+W(t)))')

Warning, the function names {W} are not recognized in the target language

 

cg = ((tanh(x) - 0.1e1) ^ (0.1e1 / 0.4e1)) * exp(i * (-0.3e1 * x + W(t)));

 

N := 100:

use Finance in:
  Wiener := WienerProcess():
  P := PathPlot(Wiener(t), t = 0..10, timesteps = N, replications = 1):
end use:

W__points := plottools:-getdata(P)[1, -1]:
t_grid := convert(W__points[..,1], list):
x_grid := [seq(-2..2, 4/N)]:

T, X := map(mul, [selectremove(has, [op(expand(solnum))], t)])[]:

ST := unapply(eval(T, W(t)=w), w)~(W__points[.., 2]):
SX := evalf(unapply(X, x)~(x_grid)):

STX := Matrix(N$2, (it, ix) -> ST[it]*SX[ix]);

_rtable[36893490640185799852]

(5)

opts := axis[1]=[tickmarks=[seq(k=nprintf("%1.1f", t_grid[k]), k=1..N, 40)]],
        axis[2]=[tickmarks=[seq(k=nprintf("%1.1f", x_grid[k]), k=1..N, 40)]],
        style=surface:

DocumentTools:-Tabulate(
  [
    plots:-matrixplot(Re~(STX), opts),
    plots:-matrixplot(Im~(STX), opts),
plots:-matrixplot(abs~(STX), opts)
  ]
  , width=60
)

"Tabulate"

(6)

MatlabFile := cat(currentdir(), "/ST2.txt"); ExportMatrix(MatlabFile, STX, target = MATLAB, format = rectangular, mode = ascii, format = entries)

421796

(7)

NULL

Download data-analysis.mw

After download MapleFlow 2024.2 "fsolve" return only one solution for a polynom of n-order.

Can I unchain by an hidden order?

is(abs(x)=max(x,-x)) assuming real;

#  FAIL

I wonder if this will work in newer versions of Maple?

It's becoming increasingly common for questions to be deleted, the most frequently evoked argument being that they duplicate earlier questions.
Usually it's the author of the question who complains, in this case it's the one who provided an answer.

I've always found this self-given freedom on the part of moderators somewhat inappropriate, especially given that these deletions are done on the sly, without even the courage to be explicitly claimed by their authors.

Couldn't these latter take the time to leave a message indicating what they've just done (and why) and where the deleted question, and any exchanges associated with it, can be found?
Otherwise, this attitude is more akin to contempt and censorship than to real management of this blog.

A few years ago, when I came to this site, these deletions were the exception and I can only deplore the fact that they have become commonplace.
They say that life is better elsewhere, I don't know, but what I do know is that I've never come across this on any Scilab, R, SageMath or OpenTurns user's blog.

Anyway, here's the reply I sent to @salim-barzani :  Hirota_derivative_KdV_equation.mw

Is it possible to configure newer maple versions to use a different file extension ?

I have a lot of  Maple 9 files  with .mw extension. I dont want them opened and saved by a later version as they are valuable and actually work better than later maple versions which throws unneccesary signum errors. The results are verified so the signum errors are bogus in the recent maple versions running the same file.

Particularly, can I configure e.g. Maple 2022 to save to a different file extension say .mww or similar rather than .mw so I can avoid destroying to original 9.5 files?

What systematic methods can be used to determine the optimal parameters in a long equation involving two independent variables, and how do techniques like separation of variables, balancing principles, or dimensional analysis aid in simplifying and solving such equations?

parameters_x_t.mw

Some of the calculations mentioned here can be done in alternative programming languages, such as Python, C, and so on. However, I would like to reproduce exactly these graphs using Maple (without the need for programming commands, such as "if", "while", among others).

In the work I am trying to reproduce, we have "The evaluation of the influence of the inclusion of the broadband behavior of grounding systems in EMT-type programs in the evaluation of transients resulting from direct lightning strikes on transmission lines. The behavior of the grounding frequency is determined using an accurate electromagnetic model and included in the EMTP/ATP by means of an equivalent circuit derived from the Vector Fitting technique. In addition, the impact of the frequency dependence of soil parameters on the lightning performance of transmission lines is addressed." This may seem somewhat disconnected from reality for many, since it is a problem involving electrical engineering optimization.

Could someone help me reproduce these calculations? I have made little significant progress.

If you want to access the reference accounts, I'll send you the PDF

schroeder2017 [link to copyrighted material replaced by moderator]

I'm evaulating Maple Flow and wondered if any Mathcad users have transferred to Maple Flow?

What are the pros/cons of Maple Flow? It's different to what I'm used to so I need to spend time learning. But I'm liking what I see so far.

First 8 9 10 11 12 13 14 Last Page 10 of 359