MaplePrimes Questions

I need to plot a function:



f(1.0) gives a correct result but plot doesn't. Could you help me with it?

Dear those who are in Mapleprimes,

 

As I can't understand how Maple calculate the quick sort, I write the present question, hoping that someone give me a hint.

In essence, nested procedure I cannot understand is this:

 

quicksort:=proc(A,m,n)

....................

if m<n then

quicksort(A,m,p-1);.................................(1)

quicksort(A,p+1,n)...................................(2) 

end if;

eval(A);

end proc:

 

Details were ommitted, but I have to say that p is the number between m and n, which is determined by ommitted parts of 

the procedure.

And, with this nested procedure, 

quicksort([2,4,1,5,3],1,5) is calculated.

 

What I want to know is how to process the parts of (1) and (2).

If after (1) is processed, (2) is processed, what is the value of p in (2).

Is it the p which is determined successively through processing nested value of (1)?

 

Thank you in advance.

 

taro

Can anyone help to compute the following integral in terms of the bessel functions in maple.

Hey guys! Can someone please help me by telling what I can insert into maple to get answer for this question? Thanks!

Please I want to know how to solve this integration.

 

int(exp(-(ln(y)-2*sigma^2)^2/(8*sigma^2))/(y*sqrt(8*Pi*sigma^2))*exp(-(ln(y+z)-2*sigma^2)^2/(8*sigma^2))/((y+z)*sqrt(8*Pi*sigma^2)), y = 0 .. infinity)

The help documents read,

 The function unames returns an expression sequence consisting of all the active names in the current Maple session which are ``unassigned names''.

 

But what unames() returns is obviously not the contents one expects:

 

i am trying to execute the following code but i am having the following error:

A:=Matrix(21,4):A(1,2):=0:A(2,2):=0:t:=2: thetasec:=-8.724679300*10^(20):  for z from 0.1 by 0.05 to 1 do  t:=t+1: A[t,1]:=z:  x:=2*A[t-1,2]-A[t-2,2]+thetasec*0.05^(2):  theta2:=evalf(arctan(sin(x-Pi),cos(x-Pi))+Pi):    if theta2>Pi/(2)and theta2<=(3*Pi)/(2)then   A[t,2]:=theta2-Pi   elif theta2>(3*Pi)/(2)then A[t,2]:=theta2-2*Pi else  A[t,2]:=theta2 fi:  A[t,3]:=cos(A[t,2]):  A[t,4]:=sin(A[t,2]):

A:=Matrix(21,4):A(1,2):=0:A(2,2):=0:t:=2: thetasec:=-8.724679300*10^(20):  for z from 0.1 by 0.05 to 1 do  t:=t+1: A[t,1]:=z:  x:=2*A[t-1,2]-A[t-2,2]+thetasec*0.05^(2):  theta2:=evalf(arctan(sin(x-Pi),cos(x-Pi))+Pi):    if theta2>Pi/(2)and theta2<=(3*Pi)/(2)then   A[t,2]:=theta2-Pi   elif theta2>(3*Pi)/(2)then A[t,2]:=theta2-2*Pi else  A[t,2]:=theta2 fi:  A[t,3]:=cos(A[t,2]):  A[t,4]:=sin(A[t,2]):od

Error, cannot determine if this expression is true or false: (1/2)*Pi < 3.535344555 and 3.535344555 <= (3/2)*Pi

what is causing this error and how can i fix it 

 

I'm using Maple 12 to solve a system of differential equations numerically. I first define my system as "sys1" and then use the command:

sol1 := dsolve(sys1, numeric, output = listprocedure, range = 0 .. 2000)

I'm using output=listprocedure because that's what the Maple's Help says if I want to use individual solutions. So my differential equation system has 8 solutions, and I label them a1(t) through a8(t). Now after solving the system I want to be able to evaluate, e.g., a1(t) at t=100.

I then follow the Maple's Help by defining:

f1(t):=eval(a1(t),sol1)

But then if I do:

f1(100)

I don't get the expected numerical value. Instead I get a1(100) as the result.

What I managed to do however was to plot f1(t) with the following command:

plot(f1(t),0..2000)

So it seems that I did it partially right. However according to the Maple's Help I should be able to extract numerical values with f1(100). 

I'd appreciate any suggestions!

Hello,

It is not a very important question... but i like when i have a nice worksheet.

I would like to change the color of the maple input. Unfortunately, i manage to change the color for the inputs already created but not for the new maple input.

How can i change the color for the new maple input i want to create ?

Thank you for your help.

I saw the expression:

proc(a::array(1, mumeric))

the decration of a is array(a, numeric).

But, I can't find still now the expression of array(a, numeric) in HELP in maple.

In the term of array, it is written that it takes as arguments indexfcn, bounds, list.

as in  array( indexfcn, bounds, list).

1 in array(1, mumeric)) is bounds, and probably numeric in array might mean each terms of the array such as (1,2,3)

has to take the property of being numeric. But, it is not written in the term of array in the HELP of Maple.

Where can I find that syntax of array of array(1, numeric)?

 

Thanks in advance.

 

taro 

 

 

 

 

How can I solve raychaudhuri equations numerically using GRtensor?

Hi guys, i'm a student from France, so excuse  me in advance for my english.

 

I'm currently struggling to solve a partial differential equation :


where E,I,Fv,p,S0,L are constants.

 

When i ask Maple to solve it, here's its answer

 

But how can i use this solution ? May I use a different method ? Any suggestion ?


here's the code :
[code]E := (1/2)*Fv*(L-y)^2+EI*(diff(x(y, t), `$`(y, 2))) = -(1/12)*p*S0*(diff(x(y, t), t, t))*(L-y)^4/L^2;[/code]

to get the solution type the following code :

[code]pdsolve(E);[/code]

any advice would be appreciated

Thank you for your concern.

 

g := (-12*y^2+1)/(4*y^2+1)^3 * ln(abs(-1+2^(1-x-I*y)));

Compute Int(g, [x=1/2 .. infinity, y=0 .. infinity]).

PS: this stems from How to calculate hard integral?,
but it is not related to the RH.

My problem is i am working with a very large randomly generated output, generated using maple's builtin in random generating functions. I have the output which i want to investigate but i want to be able to reproduce this result when i save and close the worksheet. Since the list of generators is very long copy pasting is not very nice and i donot know the seed of these generaters. I want to ask if i can store the values in variable in the worksheet so that when i open the worksheet i can get the same random generates stored in the variable.

Dear All

 

I have a question about applying fsolve in MAPLE.

These codes come from an applicable model from heat transfer.

I previously solve such systems, but the fsolve takes long time, for example for N=2, I have 12 equations with 12 unknowns. But the fsolve does not work!

I try by N=3 or N=4, but a similar result has been obtained.

 

If kindly is possible, please give me a help for using fsolve more efficiently that solve my problem.

I have MAPLE 13 in my PC.

 

With kind regards,

Emran Tohidi.

 

> restart;
> with(orthopoly);
print(`output redirected...`); # input placeholder
> Digits := 20;
> N := 3; f := proc (x) options operator, arrow; cos(Pi*(x-1/2)) end proc; h1 := proc (t) options operator, arrow; 0 end proc; h2 := proc (t) options operator, arrow; 0 end proc; E := proc (t) options operator, arrow; cos(.2*Pi)*exp(-t^2) end proc;
print(`output redirected...`); # input placeholder
> u := sum(sum(b[m, n]*P(m, 2*x-1)*P(n, 2*t-1), m = 0 .. N), n = 0 .. N);
print(`output redirected...`); # input placeholder
> u := unapply(u, x, t);
print(`output redirected...`); # input placeholder
> ut := diff(u(x, t), `$`(t, 1)); ut := unapply(ut, x, t);
print(`output redirected...`); # input placeholder
> uxx := diff(u(x, t), `$`(x, 2)); uxx := unapply(uxx, x, t);
print(`output redirected...`); # input placeholder
> a := sum(c[m]*P(m, 2*t-1), m = 0 .. N); a := unapply(a, t);
print(`output redirected...`); # input placeholder
> A := fsolve(P(N+1, 2*x-1) = 0);
print(`output redirected...`); # input placeholder
> S1 := {seq(seq(ut(A[i], A[j])-a(A[j])*uxx(A[i], A[j]) = 0, i = 2 .. N), j = 2 .. N+1)}; S2 := {seq(u(A[i], 0)-f(A[i]) = 0, i = 2 .. N)}; S3 := {seq(u(0, A[j])-h1(A[j]) = 0, j = 1 .. N+1)}; S4 := {seq(u(1, A[j])-h2(A[j]) = 0, j = 1 .. N+1)}; S5 := {seq(u(.3, A[j])-E(A[j]) = 0, j = 1 .. N+1)}; S := `union`(`union`(`union`(`union`(S1, S2), S3), S4), S5);
print(`output redirected...`); # input placeholder
> sol := fsolve(S);



First 1423 1424 1425 1426 1427 1428 1429 Last Page 1425 of 2434