## 1201 Reputation

17 years, 241 days

## Hallo, If you know the...

Hallo,

just re-type your expression in the form you want to have. It seems to be uncool, but it is the fastest way. One could disagree and say, that if i know the proper comands for this task, i would have an easy job next time this kind of problem occurs.  But this never happened to me. Term manipulation is awkward in Maple.

## take it with a grain of ...

take it with a grain of  salt Sandor, it is just an idea.

## ok, that's better. I can now...

ok, that's better. I can now apply commands like collect, normalize and whatnot. That's enough for now.  I'm going to check out polynomials of higher degree, to see if it still works.

## Thanks Alec, smells like a...

Thanks Alec, smells like a workaround though, but i know that one has to help Maple sometimes..

Assume i want to do things with the output, for example normalize the output.

restart:

alias(alpha=(108+12*177^(1/2))^(1/3));alias(1/alpha=1/(108+12*177^(1/2))^(1/3));

solve(x^3+2*x+1=0,x);

-1/6*alpha+4/alpha, 1/12*alpha-2/alpha+1/2*I*3^(1/2)*(-1/6*alpha-4/alpha), 1/12*alpha-2/alpha-1/2*I*3^(1/2)*(-1/6*alpha-4/alpha)

Let's take the first solution:

normal(-1/6*alpha+4/alpha);

-1/6*((108+12*177^(1/2))^(2/3)-24)*1/alpha

Again, the replacement isn't done completely, i want to have

-1/6*(alpha^2-24)/alpha

Probably, there is another workaround, but this strategy lacks consistency, it is hacking. Maybe one has to use the RootOf command, i don't know.

## I'd suggest inserting a...

I'd suggest inserting a Table. For example a 1 row and 3  colums table. Put your polynomial into the middle cell and align left and right cell border as you wish, then hide the boundary lines. Choose a nice background colour for your cell and it looks like a nice powerpoint presentation :-)

## ok, even without rerunning...

ok, even without rerunning the whole worksheet and only repeating the last three commands there's no memory leak.

## Im using winxp and ...

Im using winxp and  Maple 12 build 347164. Right from the start Maple.exe uses around 50 MB (according to task manager) + 12 MB when running the sheet. No cummulative memsucking though. After 5 times re-executing the whole sheet it's still 63 MB mem usage.

a:={1,2,3}:
b:=4,5:

map(x->x*b,a);

Thomas

## yes, an arrow is missing in...

yes, an arrow is missing in my initial post. I guess i better use the Leibnitz notation for the derivative (d/dt), as double superscripted variables  with dot and arrow dont look right.

it helps, tx

## to be honest...

I want to add that this problem wasn't part of  my work, but for someone else who asked on another forum.. I cannot imagine that i would be in need of doing such troublesome constructs. But those odd programming attempts from beginners are often an opportunity for me to come here and to learn more about Maple, thats why i really appreciate the different solutions you all posted here.

## try this...

interface(rtablesize):=11;

## Well i see there are some...

Well i see there are some effective ways to accelerate things, although i don't like the idea to specify low level things like datatype=float[8] or similar. Maple should do this for me (probably not possible). Also, thanks for poining out that forNext loops are not generally bad in terms of processing time. Moreover, you can easily specify stepsize->more flexibility.

Of course seq, zip and map allow a more compact notation, as there is no embracing do..end do term.

## @alec: yes, another good and...

@alec: yes, another good and compact solution, altough you left out the square root operation, so runtimes aren't comparable.

## I will keep those examples in...

I will keep those examples in mind, thanks.

 First 12 13 14 15 16 Page 14 of 16
﻿