## 1201 Reputation

17 years, 198 days

## trouble with differential equation...

Maple

Hi,  Maple seems to be unable to solve this kind of differential equation.

dgl:=diff(f(x),x)=f(x)-f(x-1);

dsolve(dgl);

Error, (in ODEtools/info) found the indeterminate function f with different arguments {f(x), f(x-1)}

## trouble with roots...

Maple

Hi, i want to find the roots of a polynomial and replace pepetitive (long) expressions in it by using alias.

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

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

This looks nasty, so i want to replace (108+12*177^(1/2))^(1/3)

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

## nice looking superscripted Arrows ?...

Maple

Hi, i just want to write this equation im Maple,  how do i do it ?

thanks

## map instead of loops ?...

Maple

Hi, people say that for-next loops are the worst way to apply repeated operations (why?). Assume i have the list

L:=[1,3,5,6];

and the command line that does some stuff in it :

for i from 1 to nops(L)-1 do
sqrt(5*L[i]-L[i+1]);
end do;

Whats a better way to do this? I guess map is useful here, but i cant get it to work.

## magic with lists...

Maple

Hi,  assume i have a list

m:=[1,5,3];

My (to the core reduced) problem is:
I want to write a procedure that generates  the sequence containing the listname  together with its elements:

m1,m5,m3

my try:

p:=proc(L::list)
`L`||(op(L));
end proc;

This doesn't work (illegal use of a formal parameter).

What to do ?

 First 6 7 8 9 Page 8 of 9
﻿