Preben Alsholm

MaplePrimes Activity

These are replies submitted by Preben Alsholm

@Oliveira When you write something you will see (as I do at this moment) a bunch of icons in two rows.
Go to the second row. Click on the fourth from the end. It looks somewhat like this < >.
Now doing it:



First I removed all ouput by doing Ctrl+D.
Under the "Files" tab I then tried "Export as ..." and chose Maple Input (.mpl).
On my computer that file opened in NotePad++ , which is free to download, and in my view excellent.
The file looked like this:

# Using the Expression palette:
cos(5.) ;
# Using the Expression palette:
# Using Command Completion:  

Because I always use Worksheet mode and Maple 1D input, I chose to copy that code and paste it into under the present content in that file.
The result is this after executing the whole sheet (using !!!):

PS. Using NotePad++ as before but removing "NULL;" using Find and replace all, where you just have an empty box for 'Replace by' you get a neater looking input:

PPS. Exporting as text and then using Notesblok (Danish for NotePad, same text editor).
Then removing besides what is mentioned above also '>'  and proceeding as above, works too.

@mmcdara My immediate reaction to this is that it looks more confusing.
To me a less complicated looking way to achieve the same flexibility would be something like this:


fp:=proc(A::Vector,F::Vector,Theta::Vector) local n, i,x;
   if not nops(numelems~({A,F,Theta}))=1 then error "The three vectors in input must be the same size" end if;
   unapply(add(A[i]*cos(F[i]*x+Theta[i]), i=1..n),x)
 end proc;
f:=fp(<1,2,3>,<7,9,13>,<-3,89,5.>); #Example
f(8.9); # Test
plot(f,0..30); #Test
fp(<6,7,8>,<6,8>,<4,5,9>); #Check of error message 


@WA573 There are two values of w in the solution!
You can write the solution as a linear combination instead:

That the image has &* instead of plain * is done to prevent the scalars from going back inside.
The work was actually done in Maple, but copied as an image.

This infamous warning coming overwhelmingly from Danish students has been an embarrassment to Maple for years and years.

Your only hope is that someone like MaplePrimes user acer will have a look at your worksheet. He has helped quite a few over the years.
Godt Nytår!

I see no content except four rectangles.

@Kitonum On my computer with Maple 2022.2 the computation took only 0.047 seconds.

I started by just copying from the code as written in the question. (Only changing LinearSolve to LinearAlgebra:-LinearSolve as you did).
It went fine and with no errors. So there aren't any syntax errors in his code.

Maple's solve returns NULL on 1/ x = 0:


Mathematically, that is what I would expect: Infinity is not a real number.

You need to contact Customer Service via

They will probably require that you uninstall the existing version from your old computer.

@tomleslie Certainly simpler. My sneaking suspicion because of their being two loops is that he wanted this:

for i from 1 to n do
  for j from  1 to n do
  end do
end do:

Thus in the simpler way:



You need to tell us what sgn and IF are. Presumably sgn is signum, but what about IF? Is it `if` (i.e. ifelse)? If so it needs 3 arguments.

@dharr Fortunately even without 'zero' simplify works:

simplify([0.*I-3, 5, 7, -2]);

@Carl Love The reason for using Maple 12 was that on my most recent and fastest computer I only have Maple 2022, 2021, and 12.
I have many more on my old laptop. I was able to check Maple 15 through 18. All returned unevaluated.
I wasn't able to check Maple 2015 and 2016, because my computer wouldn't connect to the kernel despite numerous and lengthy updates of this rarely used computer. Maple 2017 worked just fine, however, on the same computer. The result was as in Maple 2022.

## Addition: Maple 8 on my old computer gets the correct result reporting it as 8.173973726/Pi^2, which is .8281966926.

@jediknight I tried maximize in Maple 12. It returned unevaluated.

But this worked in Maple 12:



@Rouben Rostamian  There is a problem with your solution: It doesn't solve the original ode for t > a.

The reason is the meaning of  x^(2/3) in Maple when x is negative:
x^n = exp(ln(x)*n) = exp((ln(abs(x)) + argument(x)*I)*n), where argument in Maple means the principal argument. Thus ln in Maple is the principal branch of ln.

evalc(x^(2/3)) assuming x<0;

If instead you modify the original ode to ode := diff(v(t),t) = -2*(v(t)^2)^(1/3), then the solution given by you satisfies ode for all t.

Alternatively you could modify your solution of the original ode to
sol := piecewise(t > a, 0, -(8*(t-a)^3)/27);

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