MaplePrimes Questions

Search Questions:

Latest Questions Latest Questions Feed

Hi, I am new to the Maple.

I have been trying to figure out this question:

Find the numerical (decimal) value of

f (ln (5π) + 2e5 + √ 4 + sin (4) ) 

 Here is what I wrote:

>f := ln(5*Pi)+2*e^5+sqrt(4+sin(4));
f := ln(5*Pi)+2*e^5+sqrt(4+sin(4))
>evalf(%);
4.555055775+2.*e^5

I got "4.555055775+2.*e^5" as my answer which is correct. However, I would perfer to get a decimal number like "301.381..."

Could anybody show me how?

The page ?type,piecewise shows the example

type(piecewise[](x < 1, a, b), 'piecewise');

and lines 4-8 of showstat(`print/piecewise`) deal with the case of an indexed piecewise. Yet I can find no other reference to indexed piecewise. What is it used for? When I put an index on a piecewise, nothing special seems to happen, either computationally or display-wise:

piecewise[abs](x > 0, x, -x);
piecewise[Carl](x > 0, x, -x);

The code in `print/piecewise` suggests that it serves some purpose.

system3d := a[1](a[1])+a[2]*a[4]+a[3]*a[7]-a[1](a[1])-a[2]*a[10]-a[3]*a[19], a[1]*a[2]-a[1]*a[2]+a[2]*a[5]-a[2]*a[11]+a[3]*a[8]-a[3]*a[20], a[1]*a[3]-a[1]*a[3]+a[2]*a[6]-a[2]*a[12]+a[3]*a[9]-a[3]*a[21], a[1]*a[4]-a[1]*a[4]-a[2]*a[13]-a[3]*a[22]+a[4]*a[5]+a[6]*a[7], a[2]*a[4]+a[5](a[5])+a[6]*a[8]-a[1]*a[5]-a[2]*a[14]-a[3]*a[23], a[3]*a[4]+a[5]*a[6]+a[6]*a[9]-a[1]*a[6]-a[2]*a[15]-a[3]*a[24], a[1]*a[7]+a[4]*a[8]+a[7]*a[9] = a[1]*a[7]+a[2]*a[16]+a[3]*a[25], a[2]*a[7]+a[5]*a[8]+a[8]*a[9] = a[1]*a[8]+a[2]*a[17]+a[3]*a[26], a[3]*a[7]+a[6]*a[8]+a[9](a[9]) = a[1]*a[9]+a[2]*a[18]+a[3]*a[27];
print(`output redirected...`); # input placeholder
a[2] a[4] - a[2] a[10] + a[3] a[7] - a[3] a[19],

a[2] a[5] - a[2] a[11] + a[3] a[8] - a[3] a[20],

a[2] a[6] - a[2] a[12] + a[3] a[9] - a[3] a[21],

-a[2] a[13] - a[3] a[22] + a[4] a[5] + a[6] a[7], a[2] a[4]

+ a[5](a[5]) + a[6] a[8] - a[1] a[5] - a[2] a[14] - a[3] a[23],
-a[1] a[6] - a[2] a[15] + a[3] a[4] - a[3] a[24] + a[5] a[6]

+ a[6] a[9], a[1] a[7] + a[4] a[8] + a[7] a[9] = a[1] a[7]

+ a[2] a[16] + a[3] a[25], a[2] a[7] + a[5] a[8] + a[8] a[9] =

a[1] a[8] + a[2] a[17] + a[3] a[26], a[3] a[7] + a[6] a[8]

+ a[9](a[9]) = a[1] a[9] + a[2] a[18] + a[3] a[27]

solve({system3d}, {a[1]*a[2], a[1]*a[3], a[1]*a[4], a[1]*a[5], a[1]*a[6], a[1]*a[7], a[1]*a[8], a[1]*a[9], a[2]*a[4], a[2]*a[5], a[2]*a[6], a[2]*a[7], a[2]*a[10], a[2]*a[11], a[2]*a[12], a[2]*a[13], a[2]*a[14], a[2]*a[15], a[2]*a[16], a[2]*a[17], a[2]*a[18], a[3]*a[4], a[3]*a[7], a[3]*a[8], a[3]*a[9], a[3]*a[19], a[3]*a[20], a[3]*a[21], a[3]*a[22], a[3]*a[23], a[3]*a[24], a[3]*a[25], a[3]*a[26], a[3]*a[27], a[4]*a[5], a[4]*a[8], a[5]*a[6], a[5]*a[8], a[6]*a[7], a[6]*a[8], a[6]*a[9], a[7]*a[9], a[8]*a[9], a[1](a[1]), a[5](a[5]), a[9](a[9])});
%;
Warning, solving for expressions other than names or functions is not recommended.
{a[1] a[2] = a[1] a[2], a[1] a[3] = a[1] a[3],

a[1] a[4] = a[1] a[4], a[1] a[5] = a[2] a[10] - a[3] a[7]

+ a[3] a[19] + a[5](a[5]) + a[6] a[8] - a[2] a[14]

- a[3] a[23], a[1] a[6] = -a[2] a[15] + a[3] a[4] - a[3] a[24]

+ a[5] a[6] + a[6] a[9], a[1] a[7] = a[1] a[7], a[1] a[8] = a[

2] a[7] - a[2] a[17] - a[3] a[26] + a[5] a[8] + a[8] a[9], a[1]

a[9] = a[3] a[7] + a[6] a[8] + a[9](a[9]) - a[2] a[18]

- a[3] a[27], a[2] a[4] = a[2] a[10] - a[3] a[7] + a[3] a[19],

a[2] a[5] = a[2] a[11] - a[3] a[8] + a[3] a[20],

a[2] a[6] = a[2] a[12] - a[3] a[9] + a[3] a[21],

a[2] a[7] = a[2] a[7], a[2] a[10] = a[2] a[10],

a[2] a[11] = a[2] a[11], a[2] a[12] = a[2] a[12],

a[2] a[13] = -a[3] a[22] + a[4] a[5] + a[6] a[7],

a[2] a[14] = a[2] a[14], a[2] a[15] = a[2] a[15],

a[2] a[16] = -a[3] a[25] + a[4] a[8] + a[7] a[9],

a[2] a[17] = a[2] a[17], a[2] a[18] = a[2] a[18],

a[3] a[4] = a[3] a[4], a[3] a[7] = a[3] a[7],

a[3] a[8] = a[3] a[8], a[3] a[9] = a[3] a[9],

a[3] a[19] = a[3] a[19], a[3] a[20] = a[3] a[20],

a[3] a[21] = a[3] a[21], a[3] a[22] = a[3] a[22],

a[3] a[23] = a[3] a[23], a[3] a[24] = a[3] a[24],

a[3] a[25] = a[3] a[25], a[3] a[26] = a[3] a[26],

a[3] a[27] = a[3] a[27], a[4] a[5] = a[4] a[5],

a[4] a[8] = a[4] a[8], a[5] a[6] = a[5] a[6],

a[5] a[8] = a[5] a[8], a[6] a[7] = a[6] a[7],

a[6] a[8] = a[6] a[8], a[6] a[9] = a[6] a[9],

a[7] a[9] = a[7] a[9], a[8] a[9] = a[8] a[9],

a[1](a[1]) = a[1](a[1]), a[5](a[5]) = a[5](a[5]),

a[9](a[9]) = a[9](a[9])}

 

 

 

the program runs however the warning message pops ...what can i do to eliminate the problem??? 

In Maple V, Release 4 (1996):

 

T:=table():
i:=1:N:=5000;

for i from i to N  
do
   T[i]:=T[i+1]:
   T[i+1]:=1;
   eval(T[1]);
od:
print(i);

for i from i to N  
do
   T[i]:=T[i+1]:
   T[i+1]:=1;
   eval(T[1]);
od:
print(i);

I receive this output:

N := 5000
Error, too many levels of recursion
3607
5001

Can You explain this occurence, as well as the following one:

In Maple V, Release 4 (1996):

 

T:=table():
i:=1:N:=5000;

for i from i to N  
do
  T[i]:=T[i+1]:
  eval(T[1]);
od:
print(i);
 
for i from i to N  
do
  T[i]:=T[i+1]:
  eval(T[1]);
od:
print(i);;

gives:

N := 5000
Error, too many levels of recursion
3607
Error, too many levels of recursion
3607

How does one control allowance for recursion depth?

Hi,

 

I am having trouble getting a pattern match to the Heaviside function.

patmatch(Heaviside(x), Heaviside(a::algebraic))

returns "false" whereas I would expect it to return true.

On the other hand:

patmatch(Heaviside(x), Heaviside(x::algebraic))

returns true.

 

What am I missing?

 

Regards.

 

HI,

Can anyone suggest the tutorial or good examples for parallel computing in maple.

Thanks in advance.

how to use python to call maple and scroll up or down scrollbar

what does this mean:"Error, (in EpResult) cannot evaluate the solution further right of 0.36919453e-2, probably a singularity" as I cannot find any relevant material of this error.

I am simulating a condition and get to the final stage of calculation, and this error occurs....

 

 

Hi everybody, 

 

Could somebody just explain me why commands L[1..5] and L[3..6] below do not seem to return "the same type of thing" ?

 

L := Array(1..10, [$(1..10)]);

L := Array(1..10, {(1) = 1, (2) = 2, (3) = 3, (4) = 4, (5) = 5, (6) = 6, (7) = 7, (8) = 8, (9) = 9, (10) = 10})

(1)

L[1..5];
whattype(%);

Array([1, 2, 3, 4, 5])

 

Array

(2)

L[3..6];
whattype(%);

Array(3 .. 6, {3 = 3, 4 = 4, 5 = 5, 6 = 6}, datatype = anything, storage = rectangular, order = Fortran_order)

 

Array

(3)

 


Thank you for your attention


Download array.mw

Hey,

I want to solve this equation and looking at the plot there are at least 3 solutions. I want the greatest/smallest negative solution. Unfortunately using solve with assumptions produces no results and solve without assumptions only finds two solutions.

Can you please help me?

#select greatest negative value from solution

restart:

expr:= ax*cos(lambda)+ay*sin(lambda)-(a+b*lambda)

ax*cos(lambda)+ay*sin(lambda)-b*lambda-a

(1)

ax:=1:ay:=2:a:=0.5:b:=0.25: #examplanatory values

plot(expr)

 

 

assume(-2*Pi<lambda,lambda<0): #does not work

 

sol_lambda:=[solve(expr=0,lambda, useassumptions)];# returns empty list even though without assumption one solution is found

Warning, solutions may have been lost

 

[]

(2)

sol_lambda:=[solve(expr=0,lambda)]; #returns only two solutions even though looking at the plot 3 are there

Warning, solve may be ignoring assumptions on the input variables.

 

Warning, solutions may have been lost

 

[2.190357220, -.2688724573]

(3)

sol_l_v:=evalb~(sol_lambda<~0); #dirty workaraound

[false, true]

(4)

sol_l_add:=[ListTools:-SearchAll(true,sol_l_v)] ; #this seems overly complicated

 

[2]

(5)

lambda:=sol_lambda[sol_l_add[-1]];  #to select the last entry

 

-.2688724573

(6)

expr; #test

 

0.

(7)

 


Download select_solution.mw

Thanks!

Honigmelone

hi

how i can plot 4 curve in one graph in maple??

this data is given in excel format as below

thanks

16.3.xlsx

how to specify color at the turning point of mountain shape in dualaxisplot

woud like to specify a point with another color at the top of peak shape line diagram

Hi,

This is regarding numerical solution of a function and plot. I have a function in the form of f1(omega,arctan(f2(omega))), and i need to plot it with omega (as the expression is too long i cant insert it here). Now, if i am changing the range of omega in plot command then I am getting different plots for the small values of omega. Let's say if i change the range from 1..10 to 1..50 and look at the plot in the range of 1..3 then the plots looks different. Apart from this if i change the value of Digits  from 10 to 30 or 40 then every time i am getting an entire different  plot. As the expression if too long i cant convert it to Matlab expression and plot there. How to fix these issues. Please help me regarding this.

Regarding

Sunit

 

Dear all,

I am trying to solve the following equation:

y(z) = F(z) + int(sqrt(z - sigma)*y(sigma), sigma = 0..z);

intsolve(%, y(z));

But i get the following error: 

Error, (in intsolve) numeric exception: division by zero

My guess would be that there appears a limit in the calculation which exists but is not evaluated properly by Maple. Is it possible to pass this kind of exception (comparable to http://www.maplesoft.com/support/help/errors/view.aspx?path=Error,%20numeric%20exception%3A%20division%20by%20zero)

Thanks and best regards

Ferdinand

4 5 6 7 8 9 10 Last Page 6 of 1360