## I give up. Help on searching the dsolve option "di...

I found the option in this statement

`dsn := dsolve(dsys, numeric, differential = true, projection = false, maxfun = 0)`

I give up searching because

• the word "differential" occurs so often in dsolve help pages that advanced search does of not filter help topics effectively
• the option does not seem to be a dsolve[numeric] or rk45 specific option (at least I cannot find anything on the pages)

What does the option do?
How could I have searched better?

## ScatterPlot range?...

How do I set the axis range in a Maple scatter plot. It's not evident to me from the Help.

dust_paper.pdf

## Plotting a sequence against a variable...

Dear Users!

I hope everyone is fine. I want to plot the following sequence in 3d for t=0..1 and x=-pi..pi;

[0., 0.4995839572e-1*sin(x), 0.9966865249e-1*sin(x), .1488899476*sin(x), .1973955598*sin(x), .2449786631*sin(x), .2914567945*sin(x), .3366748194*sin(x), .3805063771*sin(x), .4228539261*sin(x), .4636476090*sin(x), .5028432109*sin(x), .5404195003*sin(x), .5763752206*sin(x), .6107259644*sin(x), .6435011088*sin(x), .6747409422*sin(x), .7044940642*sin(x), .7328151018*sin(x), .7597627549*sin(x), .7853981634*sin(x)];

In the sequence first entry (0) for t=0, second (0.4995839572e-1*sin(x)) for t=0.05, third (0.9966865249e-1*sin(x)) for t= 0.1 and so on the last entry (.7853981634*sin(x)) for t=1. In addition, how do I plot if the number of points exceeds in the sequence for example 100 or 1000 points, but the difference between two consecutive values for t is the same here the difference is Delta*t=0.05.

## Read and writing histogram or list to files?...

As my jobs are still crashing with memory leak, I'd like to write results out to files and read them back to add them together.

I see something called 'Export' and something called 'Import'. It didn't work for me. Does the file have to already exist? An example would be nic  ## Plotting Question...

I want to plot this function in cylindrical coordinates in a way that it is clear where the function is greater than zero and where it is less that zero. I was wondering what would be the best way to do it. It has two arbritary constants. Usually when I have only one constant, I animate the plot for different values of that constant. But I am not sure what to do for this case.

-2*M^2*sin(theta)^2 - 2*k*r^2

## How do I solve boundaty value problem with derivat...

eq1 := diff(f(x), x, x, x)+(1/2)*x*cos(alpha)*(diff(f(x), x, x))+(1/2)*sin(alpha)*f(x)*(diff(f(x), x, x))+G[r]*theta(x)+G[m]*phi(x) = 0;

eq2 := diff(theta(x), x, x)+(1/2)*Pr*cos(alpha)*x*(diff(theta(x), x))+sin(alpha)*f(x)*(diff(theta(x), x))+N[b]*(diff(theta(x), x))*(diff(phi(x), x))+N[t]*(diff(theta(x), x))^2 = 0;

eq3 := diff(phi(x), x, x)+(1/2)*Le*cos(alpha)*x*(diff(phi(x), x))+sin(alpha)*f(x)*(diff(phi(x), x))+N[t]*(diff(theta(x), x, x))/N[b] = 0;

ics := f(0) = 0, (D(f))(0) = gamma*((D@@2)(f))(0), theta(0) = 1+tau*(D(theta))(0), phi(0) = 1;

bcs := (D(f))(infty) = 0, theta(infty) = 0, phi(infty) = 0;

Parameters := G[r] = 5, G[m] = 3, Pr = 7, N[b] = .1, N[t] = .1, Le = 1, gamma = .2, tau = .1, alpha = 30*degree;

## How can I resolve this numeric integral containing...

Hi Everyone,

I have a numeric integral which I hope to evaluate (ideally over a infinite domain) that for some reason is giving me difficulty and I cannot seem to find a work around. I want to use method = _d01amc in the integral as a means to speed up the process - I am motivating this by the answer i recieved from @acer in https://www.mapleprimes.com/questions/236772-Any-Ideas-On-How-To-Speed-Upimprove - however I keep recieving an error indicating overflow.

This seems rather strange to me due to the fact that if I omit a method and just let Maple do its own thing it will eventually spit out an answer albeit slower then I would prefer for the procedure I am going to eventually impliment.

My integrand and attempts/confusion can be seen in the attached worksheet.

Any thoughts appreciated.

OverflowError.mw

## What is a more efficient way to generate OEIS' "A1...

The sequence A161786 consists of “primes with at least one digit appearing exactly four times in the decimal expansion”. Below is the Maple program given in that OEIS page:

The code above picks out primes having exactly four identical digits (determined by ) from the first 10,000 prime numbers. However, it's easy to check that this program is rather slow (It takes about 2.6s to execute it!).
Actually, I would like to select such primes from pn, pn+1, pn+2, …, pn+m-1 (typically, n＝1,000,000 and m＝1,000,000), where pk denotes the k-th prime number, yet the original program failes to do so in twenty minutes. Part of the reason is that for long sequences, the efficiency can be critical. Therefore I make a slight modification to the original code:

```A161786__0 := proc(m::nonnegint, n::posint := 1, ` \$`)::'Vector'(prime):
#(*
kernelopts(opaquemodules = false):
# *)
local p := ifelse(n = 1, 1, ithprime(n - 1)), vec := Vector('datatype' = prime);
to m do
if ormap(`=`, MultiSet(`convert/base`:-MakeSplit(length((p := nextprime(p))), 1, 10)(p)):-hash, 4) then
vec ,= p
fi
od;
vec
end:```

Nevertheless, this version is still inefficient:

```time[real](A161786__0(10**6, 10**6));
=
182.414

```

Another choice is converting each of integers into a string:

```A161786__1 := proc(m::nonnegint, n::posint := 1, ` \$`)::'Vector'(prime):
options no_options:
local p := ifelse(n = 1, 1, ithprime(n - 1)), vec := DEQueue();
to m do
if member(4, rhs~({StringTools['CharacterFrequencies'](nprintf("%d", (p := nextprime(p))), 'digit')})) then
vec ,= p
fi
od;
Vector([vec[]], 'datatype' = prime)
end:```

This time the elapsed time is reduced to nearly two minutes:

```time[real](A161786__1(10**6, 10**6));
=
118.409

```

But can this task be accomplished within (a quarter of) a minute in modern Maple? In other words, is there a way to make further improvement on the performance? (Note that the reference time is mesured using a adjusted version (i.e., ) of the Mma code provided in that OEIS page.)

## Equation system with absolute value ...

How would you solve this equation System:

x+|y+1|=1

y+|z+2|=1

z+|x-2|=1

I have no idea what to do, van please someone help me?

## code to randomly generate equations...

Hi,

I am looking for a code to randomly generate 10 equations (powers and radicals) of this type. Any ideas? Thank you. ## How to get continuous level curves?...

I have a function Gpdf from IR2 to IR+ of class C1 (this comes from the way this function is built).
Although its level curves are continuous, their display show discontinuities for some level values.

The reason is that  Gpdf contains a term whose denominator vanishes and so, even if the left and right limits of Gpdf are the same at the vanishing point, the resulting plot is dicontinuous.

More details are given in the attached file Discontinuous_contours.mw.

I have tried to adjust the plotting grid, or even to superimpose contours drawn in domains containing no singularities, but I wasn't capable to get continuous drawings (see the attached file).

Do you have any idea to achieve this?

TIA

## Accuracy issues with s-stage Runge-Kutta method...

Hi!

I have M number of linear differential equations. I have solved this system using the 1,2,3,4 stag RK method in the attached file but did not find a significant difference in the accuracy. Kindly see what's wrong there.

Thank you!

s-stage.mw

## preview print function not working correct after ...

When printing a Maple Worksheet  often I go in the PrintPrewiev of the Mac and then select some sides to print.

This is not working anymore since I have updated from Maple 2021 to Maple 2023.

Is this known ?

Any help for his ?

## Invalid left hand side in assignment - issue with ...

I was trying to assign a Vector to a Vector inside a procedure. However, when the Vector has a size of 5, I was able to do that. But not when the Vector has a size of 7.

I have the following example. I can't assign the Vector over when the Vector has a size of 7 as shown in `oneStep_egcd2`.  But I can do that when the size is 5 in `oneStep_egcd`. Copying the contents over using a for loop works as expected.

 >
 > a:= 17; b:= 5;  (1)

 > # prev := <1, a, 0, b, a>; (2)
 > curr := <0, a, 1, b, b>; (3)
 > oneStep_egcd := proc(prev::Vector, curr::Vector)     local q, t1, t2, t3;     if (curr <> 0) then         q := iquo(prev, curr);         t1, t2, t3 := prev - curr * q, prev - curr * q, prev - curr * q;         prev = curr;         curr, curr, curr := t1, t2, t3;     end if: end proc:
 > oneStep_egcd(prev, curr) (4)  > # prev := <1, 1, a, 0, 0, b, a>; (5)
 > curr := <0, 0, a, 1, 1, b, b>; (6)
 > oneStep_egcd2 := proc(prev::Vector, curr::Vector)     local q, sb_q, t1, t2, t4, t5, t7;     if (curr <> 0) then         q := iquo(prev, curr);         sb_q := (q);         t1 := prev - curr * q;         t2 := prev - curr * q;         t4 := prev - curr * q;         t5 := prev - curr * q;         t7 := prev - curr * q;         prev := curr;         curr, curr, curr, curr, curr := t1, t2, t4, t5, t7;     end if: end proc:
 > oneStep_egcd2(prev, curr) > oneStep_egcd3 := proc(prev::Vector, curr::Vector)     local q, sb_q, t1, t2, t4, t5, t7, i;     if (curr <> 0) then         q := iquo(prev, curr);         sb_q := (q);         t1 := prev - curr * q;         t2 := prev - curr * q;         t4 := prev - curr * q;         t5 := prev - curr * q;         t7 := prev - curr * q;         for i to 7 do             prev[i] := curr[i];         end do;         curr, curr, curr, curr, curr := t1, t2, t4, t5, t7;     end if: end proc:
 > oneStep_egcd3(prev, curr) (7) 