Unanswered Questions

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

each time i use this i did not have any problem but this equation not seperate any one know what is problem?


 

restart

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

with(PDEtools)

P := U(xi)^3*mu*C[2]*h[9]+(2*I)*(diff(U(xi), xi))*a*k*mu+4*(diff(U(xi), xi))*k*mu^3*C[2]*h[7]-4*(diff(diff(diff(U(xi), xi), xi), xi))*k^3*mu*C[2]*h[7]-U(xi)^3*mu*C[2]*h[8]+I*(diff(diff(diff(diff(U(xi), xi), xi), xi), xi))*k^4*C[2]*h[7]+I*(diff(U(xi), xi))*U(xi)^2*k*C[2]*h[9]-(6*I)*(diff(diff(U(xi), xi), xi))*k^2*mu^2*C[2]*h[7]+I*U(xi)*mu^4*C[2]*h[7]-I*(diff(U(xi), xi))*v-U(xi)*w+b*U(xi)^3-U(xi)*a*mu^2+(diff(diff(U(xi), xi), xi))*a*k^2+I*(diff(U(xi), xi))*U(xi)^2*k*C[2]*h[8]+C[1](-U(xi)^3*mu^2*h[2]+(2*I)*(diff(U(xi), xi))*U(xi)^2*k*mu*h[4]-(2*I)*(diff(U(xi), xi))*U(xi)^2*k*mu*h[5]+(diff(U(xi), xi))^2*U(xi)*k^2*h[2]-U(xi)^3*mu^2*h[5]+U(xi)^2*(diff(diff(U(xi), xi), xi))*k^2*h[5]-(4*(diff(U(xi), xi))*I)*k*mu^3*h[1]+4*(diff(diff(diff(U(xi), xi), xi), xi))*k^3*mu*h[1]*I+(2*I)*(diff(U(xi), xi))*U(xi)^2*k*mu*h[2]+h[6]*U(xi)^5-U(xi)^3*mu^2*h[4]+U(xi)^2*(diff(diff(U(xi), xi), xi))*k^2*h[4]+U(xi)*mu^4*h[1]-6*(diff(diff(U(xi), xi), xi))*k^2*mu^2*h[1]+(diff(diff(diff(diff(U(xi), xi), xi), xi), xi))*k^4*h[1]+h[3](k^2*(diff(U(xi), xi))^2+2*(0+I)*(diff(U(xi), xi))*k*mu*U(xi)-mu^2*U(xi)^2)*U(xi)) = 0

U(xi)^3*mu*C[2]*h[9]+I*(diff(U(xi), xi))*U(xi)^2*k*C[2]*h[8]+4*(diff(U(xi), xi))*k*mu^3*C[2]*h[7]-4*(diff(diff(diff(U(xi), xi), xi), xi))*k^3*mu*C[2]*h[7]-U(xi)^3*mu*C[2]*h[8]+I*(diff(U(xi), xi))*U(xi)^2*k*C[2]*h[9]-(6*I)*(diff(diff(U(xi), xi), xi))*k^2*mu^2*C[2]*h[7]+I*U(xi)*mu^4*C[2]*h[7]-I*(diff(U(xi), xi))*v+(2*I)*(diff(U(xi), xi))*a*k*mu-U(xi)*w+b*U(xi)^3-U(xi)*a*mu^2+(diff(diff(U(xi), xi), xi))*a*k^2+I*(diff(diff(diff(diff(U(xi), xi), xi), xi), xi))*k^4*C[2]*h[7]+C[1](-U(xi)^3*mu^2*h[2]+(2*I)*(diff(U(xi), xi))*U(xi)^2*k*mu*h[4]-(4*I)*(diff(U(xi), xi))*k*mu^3*h[1]+(diff(U(xi), xi))^2*U(xi)*k^2*h[2]-U(xi)^3*mu^2*h[5]+U(xi)^2*(diff(diff(U(xi), xi), xi))*k^2*h[5]+(4*I)*(diff(diff(diff(U(xi), xi), xi), xi))*k^3*mu*h[1]-(2*I)*(diff(U(xi), xi))*U(xi)^2*k*mu*h[5]+(2*I)*(diff(U(xi), xi))*U(xi)^2*k*mu*h[2]+h[6]*U(xi)^5-U(xi)^3*mu^2*h[4]+U(xi)^2*(diff(diff(U(xi), xi), xi))*k^2*h[4]+U(xi)*mu^4*h[1]-6*(diff(diff(U(xi), xi), xi))*k^2*mu^2*h[1]+(diff(diff(diff(diff(U(xi), xi), xi), xi), xi))*k^4*h[1]+h[3](k^2*(diff(U(xi), xi))^2+(2*I)*(diff(U(xi), xi))*k*mu*U(xi)-mu^2*U(xi)^2)*U(xi)) = 0

(2)

Re(P)

Re(U(xi)^3*mu*C[2]*h[9]+4*(diff(U(xi), xi))*k*mu^3*C[2]*h[7]-4*(diff(diff(diff(U(xi), xi), xi), xi))*k^3*mu*C[2]*h[7]-U(xi)^3*mu*C[2]*h[8]-U(xi)*w+b*U(xi)^3-U(xi)*a*mu^2+(diff(diff(U(xi), xi), xi))*a*k^2+C[1](-U(xi)^3*mu^2*h[2]+(2*I)*(diff(U(xi), xi))*U(xi)^2*k*mu*h[4]-(4*I)*(diff(U(xi), xi))*k*mu^3*h[1]+(diff(U(xi), xi))^2*U(xi)*k^2*h[2]-U(xi)^3*mu^2*h[5]+U(xi)^2*(diff(diff(U(xi), xi), xi))*k^2*h[5]+(4*I)*(diff(diff(diff(U(xi), xi), xi), xi))*k^3*mu*h[1]-(2*I)*(diff(U(xi), xi))*U(xi)^2*k*mu*h[5]+(2*I)*(diff(U(xi), xi))*U(xi)^2*k*mu*h[2]+h[6]*U(xi)^5-U(xi)^3*mu^2*h[4]+U(xi)^2*(diff(diff(U(xi), xi), xi))*k^2*h[4]+U(xi)*mu^4*h[1]-6*(diff(diff(U(xi), xi), xi))*k^2*mu^2*h[1]+(diff(diff(diff(diff(U(xi), xi), xi), xi), xi))*k^4*h[1]+h[3](k^2*(diff(U(xi), xi))^2+(2*I)*(diff(U(xi), xi))*k*mu*U(xi)-mu^2*U(xi)^2)*U(xi)))-Im((diff(U(xi), xi))*U(xi)^2*k*C[2]*h[8]+(diff(U(xi), xi))*U(xi)^2*k*C[2]*h[9]-6*(diff(diff(U(xi), xi), xi))*k^2*mu^2*C[2]*h[7]+U(xi)*mu^4*C[2]*h[7]-(diff(U(xi), xi))*v+2*(diff(U(xi), xi))*a*k*mu+(diff(diff(diff(diff(U(xi), xi), xi), xi), xi))*k^4*C[2]*h[7]) = 0

(3)

``


 

Download real_and_imaginary_.mw

Hi, I have plotted the bar graphs, and it's fine but I am interested in showing the value on each bar. How to implement this. As an example, I uploaded a picture for convenience.

Bar_graphs.mw

I have encountered an issue: eq1 is not satisfied, though eq2 is satisfied for the parametric value (10). I need assistance in finding a way to ensure that both equations are satisfied simultaneously. Please provide guidance or suggest a potential approach for addressing this issue.verf_kk.mw

I have  a big problem in transformation How we can do suh transformation in  type of  procure  without use any hand work for example in physic abs|-| remove the exponential term how the maple remove that term automatically and collect all term and do my transformation this example is really hard one which is must do a lot by hand and mixed them which maybe a week take my time to get results and how i reach the results without spending that time i have a result of this equation and i am try to get but i don't know the results of this person is correct or not but i will share in here,  i did some try i will share in here too if in DEchange add U(xi) it will work and give me the other step but i need something more effective, when q^* is conjugate of q =exp(-ipsi(x,t))U(xi)

NULL

restart

with(PDEtools)

with(Physics)

with(SolveTools)

undeclare(prime)

`There is no more prime differentiation variable; all derivatives will be displayed as indexed functions`

(1)

 

 

tr := {t = tau, x = xi/k+v*tau^alpha/(k*alpha)+theta, u(x, t) = U(xi)*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta)), u[1](x, t) = U(xi)*exp(-I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))}

{t = tau, x = xi/k+v*tau^alpha/(k*alpha)+theta, u(x, t) = U(xi)*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta)), u[1](x, t) = U(xi)*exp(-I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))}

(2)

pde := I*(I*U(xi)*exp(I*(xi/k+v*tau^alpha/(k*alpha)-mu*tau+theta))*w-exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))*(diff(U(xi), xi))*v)+a*(diff(u(x, t), `$`(x, 2)))+b*U(xi)^2*u(x, t)+C[1](h[1]*(diff(u(x, t), `$`(x, 4)))+h[2]*(diff(u(x, t), x))^2*u[1](x, t)+h[3]*abs(diff(u(x, t), x))^2*u(x, t)+h[4]*U(xi)^2*(diff(u(x, t), `$`(x, 2)))+h[5]*u(x, t)^2*(diff(u[1](x, t), `$`(x, 2)))+h[6]*U(xi)^4*u(x, t))+I*C[2]*(h[7]*(diff(u(x, t), `$`(x, 4)))+h[8]*U(xi)^2*(diff(u(x, t), x))+h[9]*u(x, t)^2*(diff(u[1](x, t), x))) = 0

I*(I*U(xi)*exp(I*(xi/k+v*tau^alpha/(k*alpha)-mu*tau+theta))*w-exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))*(diff(U(xi), xi))*v)+a*(diff(diff(u(x, t), x), x))+b*U(xi)^2*u(x, t)+C[1](h[1]*(diff(diff(diff(diff(u(x, t), x), x), x), x))+h[2]*(diff(u(x, t), x))^2*u[1](x, t)+h[3]*abs(diff(u(x, t), x))^2*u(x, t)+h[4]*U(xi)^2*(diff(diff(u(x, t), x), x))+h[5]*u(x, t)^2*(diff(diff(u[1](x, t), x), x))+h[6]*U(xi)^4*u(x, t))+I*C[2]*(h[7]*(diff(diff(diff(diff(u(x, t), x), x), x), x))+h[8]*U(xi)^2*(diff(u(x, t), x))+h[9]*u(x, t)^2*(diff(u[1](x, t), x))) = 0

(3)

``

PDEtools:-dchange(tr, pde, [xi, tau, U, U(xi)])

I*(I*U(xi)*exp(I*(xi/k+v*tau^alpha/(k*alpha)-mu*tau+theta))*w-exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))*(diff(U(xi), xi))*v)+a*((2*I)*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))*(diff(U(xi), xi))/k+exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))*(diff(diff(U(xi), xi), xi))-U(xi)*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))/k^2)*k^2+b*U(xi)^3*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))+C[1](h[1]*(-(4*I)*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))*(diff(U(xi), xi))/k^3-6*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))*(diff(diff(U(xi), xi), xi))/k^2+(4*I)*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))*(diff(diff(diff(U(xi), xi), xi), xi))/k+exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))*(diff(diff(diff(diff(U(xi), xi), xi), xi), xi))+U(xi)*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))/k^4)*k^4+h[2]*(exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))*(diff(U(xi), xi))+I*U(xi)*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))/k)^2*k^2*U(xi)*exp(-I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))+h[3]*abs((exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))*(diff(U(xi), xi))+I*U(xi)*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))/k)*k)^2*U(xi)*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))+h[4]*U(xi)^2*((2*I)*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))*(diff(U(xi), xi))/k+exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))*(diff(diff(U(xi), xi), xi))-U(xi)*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))/k^2)*k^2+h[5]*U(xi)^2*(exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta)))^2*((diff(diff(U(xi), xi), xi))*exp(-I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))-(2*I)*(diff(U(xi), xi))*exp(-I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))/k-U(xi)*exp(-I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))/k^2)*k^2+h[6]*U(xi)^5*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta)))+I*C[2]*(h[7]*(-(4*I)*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))*(diff(U(xi), xi))/k^3-6*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))*(diff(diff(U(xi), xi), xi))/k^2+(4*I)*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))*(diff(diff(diff(U(xi), xi), xi), xi))/k+exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))*(diff(diff(diff(diff(U(xi), xi), xi), xi), xi))+U(xi)*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))/k^4)*k^4+h[8]*U(xi)^2*(exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))*(diff(U(xi), xi))+I*U(xi)*exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))/k)*k+h[9]*U(xi)^2*(exp(I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta)))^2*((diff(U(xi), xi))*exp(-I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))-I*U(xi)*exp(-I*(xi/k+v*tau^alpha/(k*alpha)+mu*tau+theta))/k)*k) = 0

(4)
 

NULL


Download find_ODE.mw

Hi,

I just got 2 questions regarding symbols and answers in MapleFlow (I might be doing something wrong here).

- In trying to input the integral int(F(x), x = -pi/5 .. pi/5) - this is just an example! - as a symbol,

int(F(x), x = -pi/5 .. pi/5)

MapleFlow doesn´t accept fractions or multiplications for bondaries values, unless I input "int(F(x), x = -pi/5 .. pi/5 =". Is there anyway to do it?

- is it possible to have the answer as 2*cos((3*Pi)/10), like in Maple, instead of 2.00*cos(300e-3*pi) ()symbolic expression) or 1.18 (numeric expression)?

Thanks in advance for your help.

How can I check if a name has been used/entered already but was not assigned to a value

The variable palette only lists assigned names.

I tried unames() but this lists all unassigned names. A 'user' option (which filters for user-assigned names) as in anames() does not seem to exist.

One of my failed attempts (in 1D-Math):

restart;
unames():
initial_unames := {%}:
new_name;
{unames()} minus initial_unames; # should ideally return a reduced set containing new_name;
has(%,new_name)

What else can be done? (I am probably overlooking something very simple.)

For a right triangle with two legs of the right triangle a and b, draw three circles with radius r and one ellipse as shown in the diagram (the major axis of the ellipse is parallel to the hypotenuse of the right triangle). Find a relationship between a, b, and r

@Rouben Rostamian  

Dear Sir Professor Rostamian my name is Viorel Popescu from the Polytechnic University of Bucharest if you remember in the summer of 2019 you helped me to solve the equation: rH''(r)+H'(r)+(rk^2-r^2*b^2/R^2)H(r)=0 where k, b, and R are real constants positive number, with condition H(R)=0 and H'(1/R)=R. I appreciate it very much, please I'm in a similarly embarrassing situation to beg you for an answer. I want to find the equation of audion and complete the experiment http://www.michaelvio.byethost8.com/Audion.pdf

My account in Maple Primes is the same michaelvio (35) as the email michaelvio@yahoo.com and also @gmail.com it's an experiment that I want to make for my PhD. Practically I suppose that the energy can be approx. as a series of power of frequency t from I selected severaral terms Ea := 0.00762014687*t + a*t^2 + b*t^3 + c*t^4 + d*t^5 and I guess that satisfies an equation as in the document. The case of photons is beyond my possibility, but a little help from a distinguished Professor as you should cheer me up Audion1.mw

Audion.docx

Please help! 

In the rectangular Cartesian coordinate system, three straight lines gA, gB, gC are given, which are not all parallel to each other. Another straight line g and the points Oa, Ob, Oc on it are given. A triangle ABC is to be constructed, one of whose vertices lies on gA, gB or gC and the triangle sides a, b and c (or their extensions) each run through Oa, Ob or Oc.
We are looking for the coordinates of the vertices A, B, C.
In a purely constructive solution, the calculation can be omitted.

Hello,

I noticed that the Linearly Implicit Euler method (also known as the Semi-Implicit Euler method) is not available in Maple's built-in ODE solvers. This method is useful for stiff ODEs, where part of the function is treated implicitly (for the linear term) and part is treated explicitly (for the non-linear term).

I know that the Linearly Implicit Euler method is a specialized method that probably does not find enough widespread use to justify its inclusion as a standard feature in Maple, especially given Maple's focus on numerical methods such as Runge-Kutta methods and fully implicit methods for rigid equations.

I’m wondering:

  1. Why isn’t this method included in Maple’s standard set of numerical solvers?
  2. How can I implement this method in my own code in Maple to solve stiff ODEs?

Any guidance or examples of implementation would be greatly appreciated!

Thank you!

Linearly_Implicit_Method.pdf

I need to modify only one entry in a .m file (which happens to be table entry). How do I do this?

Dear all, I tried to run the test.java example in the Eclipse IDE but receive the following error message:

Error: Unable to initialize main class examples.test2
Caused by: java.lang.NoClassDefFoundError: com/maplesoft/externalcall/MapleException

May be there is s.o. who has an idea.

Thanks

The usual ODE must be solved:
y´´*(y^3-y)+y´^2 *(y^2+1)=0
"Dangerous places" of the definition domain must be described: Where are the general solution y(x) and its derivatives continuous?

I've been evaluating Threads (since I can use Mutex in it, which is not supported in Grid).

I noticed that when measuring time to evaluate same integral inside thread it takes about 3 times as long as outside thread.

I am using time[real] to measure the time. (is this not the correct way to do this with Threads?)

Still, using threads was faster overall to integrate 10 different integrals than doing these sequentially one by one. 

When integrating 10 _different_ integrals using Threads, the total time was about 19 seconds.  While when done sequentially the overall time was about 50 seconds.  I used different integrals, to make sure Maple does not use result in its cache.

So using Threads was almost 3 times as fast, even when each int() call takes 3 times as long. (Because all the int() calls were done in parallel). 

But It seems there is some overhead to calling library function from inside Thread? (but time is compensated for since everthing is done in parallel now). Is this documented somewhere? It could be, I did not read every help page on Threads. Just started learning in early today.

But my main question is: Why int() takes 3 times as long inside Thread than outside?  I was expecting it to take similar time. Or may be I am not measuring time correctly inside Thread?

Attached test worksheet.

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1815. The version installed in this computer is 1813 created 2024, September 28, 18:14 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib\`

libname;

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

restart;

 

doall := proc(mutex_to_use,my_id,T::list)
  local s::string;
  local current_time;
  
  print("mutex is ",mutex_to_use," my id is ",my_id);
  current_time:=time[real]();
  int(T[my_id],x,method=_RETURNVERBOSE);
  print("thread ",my_id," time to integrate is ",time[real]()-current_time);  
 
end proc:

#file_id:=fopen(cat(currentdir(),"/log.txt"),WRITE);

mutex_to_use := Threads[Mutex][Create]();
T:=[sin(2*x)/(a^2+b^2*cos(x)^2),
    sin(3*x)/(a^2+b^2*cos(x)^2),
    sin(4*x)/(a^2+b^2*cos(x)^2),
    sin(5*x)/(a^2+b^2*cos(x)^2),
    sin(6*x)/(a^2+b^2*cos(x)^2),
    sin(7*x)/(a^2+b^2*cos(x)^2),
    sin(8*x)/(a^2+b^2*cos(x)^2),
    sin(9*x)/(a^2+b^2*cos(x)^2),
    sin(10*x)/(a^2+b^2*cos(x)^2),
    sin(11*x)/(a^2+b^2*cos(x)^2)];
print("time=",Calendar:-Format( Calendar:-Today(), "EEEE, MMMM dd, yyyy GG 'at' hh:mm:ss a" ));  
Threads[Wait]( seq( Threads[Create]( doall(mutex_to_use,i,T)), i=1..10)):
print("time=",Calendar:-Format( Calendar:-Today(), "EEEE, MMMM dd, yyyy GG 'at' hh:mm:ss a" ));  
#fclose(file_id);
Threads[Mutex][Destroy]( mutex_to_use );

2

[sin(2*x)/(a^2+b^2*cos(x)^2), sin(3*x)/(a^2+b^2*cos(x)^2), sin(4*x)/(a^2+b^2*cos(x)^2), sin(5*x)/(a^2+b^2*cos(x)^2), sin(6*x)/(a^2+b^2*cos(x)^2), sin(7*x)/(a^2+b^2*cos(x)^2), sin(8*x)/(a^2+b^2*cos(x)^2), sin(9*x)/(a^2+b^2*cos(x)^2), sin(10*x)/(a^2+b^2*cos(x)^2), sin(11*x)/(a^2+b^2*cos(x)^2)]

"time=", "Wednesday, October 02, 2024 AD at 11:08:15 PM"

"mutex is ", 2, " my id is ", 1

"mutex is ", 2, " my id is ", 2

"mutex is ", 2, " my id is ", 3

"mutex is ", 2, " my id is ", 4

"mutex is ", 2, " my id is ", 5

"mutex is ", 2, " my id is ", 6

"mutex is ", 2, " my id is ", 10

"mutex is ", 2, " my id is ", 8

"mutex is ", 2, " my id is ", 7

"mutex is ", 2, " my id is ", 9

"thread ", 7, " time to integrate is ", 15.192

"thread ", 1, " time to integrate is ", 16.540

"thread ", 3, " time to integrate is ", 18.185

"thread ", 5, " time to integrate is ", 18.354

"thread ", 10, " time to integrate is ", 18.367

"thread ", 2, " time to integrate is ", 18.416

"thread ", 9, " time to integrate is ", 18.544

"thread ", 6, " time to integrate is ", 18.581

"thread ", 8, " time to integrate is ", 18.604

"thread ", 4, " time to integrate is ", 18.603

"time=", "Wednesday, October 02, 2024 AD at 11:08:34 PM"

restart;

T:=[sin(2*x)/(a^2+b^2*cos(x)^2),
    sin(3*x)/(a^2+b^2*cos(x)^2),
    sin(4*x)/(a^2+b^2*cos(x)^2),
    sin(5*x)/(a^2+b^2*cos(x)^2),
    sin(6*x)/(a^2+b^2*cos(x)^2),
    sin(7*x)/(a^2+b^2*cos(x)^2),
    sin(8*x)/(a^2+b^2*cos(x)^2),
    sin(9*x)/(a^2+b^2*cos(x)^2),
    sin(10*x)/(a^2+b^2*cos(x)^2),
    sin(11*x)/(a^2+b^2*cos(x)^2)]:

print("time=",Calendar:-Format( Calendar:-Today(), "EEEE, MMMM dd, yyyy GG 'at' hh:mm:ss a" ));  
for item in T do
  current_time:=time[real]():
  int(item,x,method=_RETURNVERBOSE):
  print(" time to integrate is ",time[real]()-current_time);
od:
print("time=",Calendar:-Format( Calendar:-Today(), "EEEE, MMMM dd, yyyy GG 'at' hh:mm:ss a" ));  

"time=", "Wednesday, October 02, 2024 AD at 11:09:03 PM"

" time to integrate is ", 4.869

" time to integrate is ", 4.897

" time to integrate is ", 4.744

" time to integrate is ", 5.049

" time to integrate is ", 4.622

" time to integrate is ", 5.186

" time to integrate is ", 4.694

" time to integrate is ", 5.184

" time to integrate is ", 4.790

" time to integrate is ", 5.138

"time=", "Wednesday, October 02, 2024 AD at 11:09:52 PM"

 


 

Download why_int_timing_different_in_thread.mw

 

How to make Maple not use result of int() on same function it solved before? (this is for testing something else I am doing, and I will not use this in my main code).

I am trying to make some tests to compare things, and I'd like Maple to not remember last result.

But calling forget(int), it still seems to have remembered result it found before.

I also tried

         forget(int,forgetpermanent=true, subfunctions=true, reinitialize=true);

I do not ofcourse want to call restart in middle of loop.

Is there a way to make Maple forget result it obtained, in this example, from int()?

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

restart;

int_1:=sin(3*x)/(a^2+b^2*cos(x)^2);
int_2:=sin(4*x)/(a^2+b^2*cos(x)^2);

sin(3*x)/(a^2+b^2*cos(x)^2)

sin(4*x)/(a^2+b^2*cos(x)^2)

#first time it is slow
T:=time[real]():
int(int_1,x,method=_RETURNVERBOSE):
print("time used is ",time[real]()-T);

"time used is ", 9.477

T:=time[real](): #now it remembered last result
int(int_1,x,method=_RETURNVERBOSE):
print("time used is ",time[real]()-T);

"time used is ", 0.1e-2

forget(int); #this has no effect. It still complete much faster than first time

 

T:=time[real]():
int(int_1,x,method=_RETURNVERBOSE):
print("time used is ",time[real]()-T);

"time used is ", 0.95e-1

forget(int,forgetpermanent=true, subfunctions=true, reinitialize=true); #also this had no effect

T:=time[real]():
int(int_1,x,method=_RETURNVERBOSE):
print("time used is ",time[real]()-T);

"time used is ", 0.47e-1

#lets try different integral, now it is slow since new integral
T:=time[real]():
int(int_2,x,method=_RETURNVERBOSE):
print("time used is ",time[real]()-T);

"time used is ", 4.810

 


 

Download how_to_forget_without_restart.mw

 

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