Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

```

with(plots)

witth(plottools)

f:=(x-1)/(x+2)

p1:=plot(f,x=-3..3):
p2≔circle([0,0],1,color=blue); #add a circle to plot, would like to figure out how to do automatically
           p2≔circle([0, 0], 1, color = blue)

display(p1,p2);
```

I'm able to plot f(x), but not plot the circle.

Requesting a procedure to calculate primes p for which there exists a prime q <= p such that pi(p)=q-pi(q), where pi is the prime counting function. If possible options to select output as p, or as (p,q).

p list starts:2,13,17,29,31,43.....

q list starts: 2,11,13,17,19,23...

Thanks in advance,

David.

Spectroscopy is both qualitative and quantitative, so one can use spectral data tables of elements to do some fairly accurate Light Engineering.

Some nifty emulation of the spectral distributions of many non-LED popular lamps, which allows for direct utility calculations based on many different parameters including chromaticity, space type, lifetime, occasion, application, cost and efficiency. 7 such parameters are used with constrained weight optimization to fish out some of the more popular lamp types used in many situations today.

References (inline) the following docs:

The Science of Color, the Emission Spectra of the Elements and Some Lamp Engineering Applications

and

The Double Amici Prism Hand-held Spectroscope

First link main Theory, second link experimental verification.

Usage: Maple 18 main document code with library and data files. Download, unzip and run document for some quick results. Don't move library/data files relative to main doc. For further results and particular details, such as particular spectra & lamps, UN-comment the relevant commands in sections and execute individually after you have executed the entire sheet at least once.

Will be modified some time later to deal with LEDs. Based on elemental spectral data published by NIST. Suggestions 4 Improvements/Errors @ followup, here.

Elements.zip

For sample pics generated with the above code, click on the first reference link. All pictures therein were generated using this code.

--

Cheers,

Yiannis

Maple mint checks for errors in one file only at a time. But not across mutliple files for correctness of calls between them. (As is done in statically complied langauges, where the compiler has access to all files and can do this).

One has to run the code to find such errors. For example, given

restart;
interface(warnlevel=4);
kernelopts('assertlevel'=2);

foo:=proc(n::integer,m::string,$)
 print("in foo, n=",n, "m = ",m );
end proc;

boo:=proc()
#How to make Maple check this call is wrong using mint? 
#before running the code? It has wrong type, and also
#missing one argument.

 foo(0.1);   
end proc;

Doing 

maplemint(boo)
maplemint(foo)

shows no errors. 

In a large program, with many calls between many procs in different packages, it will be nice if one can detect such errors before running the program if possible, than having to run the program, making sure all possible paths are taken each time.

Such an error could be hidden in the code for  sometime without one noticing it (For example, if one changes the API to a proc, but not change each call to the changed proc in order to update the call to the new API), and the code path for the now wrong call is not invoked in the current test since testing does not do 100% coverage all the time.

Is there any option in mint I might overlooked to do this?  if not, how hard would it be for Maple to add such a feature? i.e. give mint, either a set of files, or .mla library, and have it check all calls between all functions, for correctness.
 

I want to evaluate a parametric function to find intervals in which a condition is satisfied. For example, in the following instance, I know that 0<=c<=1 and 0<r<1. How can find intervals for r such that the following expression is less than 1?

-r+c+1 + sqrt(  r^2 - 2*r*c -r +2*c  ) <1,

 given 

0<=c<=1 and 0<r<1  and 

r in (0, min(1,2c) )

phase_diag.mw

The constants(a_1,b_1,c,d,e) here are all real. I have to find them too. Like in MATLAB the constants randomly take any best value and show in the workspace window with the values they took in tracing.

A customer wondered if it was possible to create 2-line tickmarks on Maple plots like so

 

 

We achieved this using typeset, fractions, and backticks. Worksheet follows.

2line-tickmarks-mprimes.mw

 

a;b1;b10;b3;b4;b5;b6;b7;b8;b9;c;c7;c8;m2; t(time)(all are real constants)

x and y varying from -20 to 20.

where,

B4=b1/b3;
B5=b4/b3;
B=(B4+(3*B5)/B4)/2;
G2=sin(b5*t+b6)^(2/3);

X=(x+c)/G2;

Y1=-exp(-(b7*y^2+b8*y+b9))

Y2=-cot(b5*t+b6)/b5;

Y=Y1-Y2;

G=2*b5*cot(b5*t+b6);

U(x,y,t)=(a*(x+c))/3-(2*a*c)/3-(((x+c)^2)*G)/18+(B5*Y+2*m2*tan(c7+m2*(X-B4*Y))+c8)/G2;

I want to plot U(x,y,t) in 3d plot with its best constant values(i.e, plot having peaks).

Kindly help

 

I imported the Excel file test.xlsx to Maple with ExcelTools, but I got unwanted quotation marks in Matrix B.

Question 1: What is the reason?

Question 2: How to remove the quotes?

download_test.xlsx

restart:
with(ExcelTools);
interface(rtablesize=20):
B:=ExcelTools:-Import("C:\\Users\\Maplelover\\Desktop\\test.xlsx", "Table 1");

 

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

Hello everyone,

I'm trying to solve a system of 9 quadratic equations in 12 variables. I would like to know if there exists at least one solution, where the variables are different from zero, but the evaluations lasts for too long. The system is defined in sys.mw.

In alternative, I added 3 more equations:

a1 = b1

b2 = c2

e1 = f1

in order to have the same number of variables and equations. And finally I added the constraints that a1>0 not to get the solution where all the variables are null. The modified system is defined in sys2.mw

Again, the evaluation lasts for too long, I don't know how to solve it or at least see if a solution exists. 

sys.mw

sys2.mw

Please, can you help me? 

 

how to compute the integral of (1+lnx)/x in the interval from 1 to e by using substitution teqnique. Substitute u=1+lnx

Good evening Maple afficiandoes,

Is there any way to tell Maple to discard boundary terms? For example, if Maple comes across an integral like

int(diff(u(x,t),x),x=-infinity..infinity)

where u goes to zero at the infinities, can I make it spit out 0 as the result?

Hello there, 

Would you please tell me how to make the expression 'eq9_13_m3' into 'desired' by substituting part of 'eq9_13_m3' with 'aux2' expression?


 

restart;

eq9_13_m3 := 2*R__R*s*omega__s*L__sigma_S/(s^2*L__sigma_S^2*omega__s^2 + R__R^2);

2*R__R*s*omega__s*L__sigma_S/(s^2*L__sigma_S^2*omega__s^2+R__R^2)

(1)

aux2 := s_hat = R__R/(L__sigma_S*omega__s*s);

s_hat = R__R/(omega__s*L__sigma_S*s)

(2)

desired := 2*(s/s_hat) / (1+(s/s_hat)^2);

2*s/(s_hat*(1+s^2/s_hat^2))

(3)

 


Merry Christmas!

Download Q20201204.mw

```

f:=(1/(1-x^2));

s:=convert(f,FormalPowerSeries)       

s:=simplify(s)          

c:=k->(op(1,s))/(x^k);

```

I'm trying to get it to find that c(k)=x^2 starting with x^k*2, but it divides by x^2 instead of x^k.  What am I doing wrong?

First 468 469 470 471 472 473 474 Last Page 470 of 2223