MaplePrimes Questions

how_do_i_get_floating_point_answer.mw

 solve({-(1/3)*(eta+5)/(eta-3) = 3*eta/(-2+eta)})

{eta = 6/5-(1/5)*61^(1/2)}, {eta = 6/5+(1/5)*61^(1/2)}

(1)

I want the answer

eta := 6/5-(1/5)*61^.5

-.362049935

(2)

what is the command i should use? Please help. Thanks.

``

 

Download how_do_i_get_floating_point_answer.mw

Ramakrishnan V

rukmini_ramki@hotmail.com

Dear all;

Thank you for helping me, to plot two function on the same graph.

 

restart;
with(plots):

ode := diff(y(x), x, x) = x*y(x)+x;
a:=2; b:=3;  # we work in the interval (a,b)
ics := y(a) = 0, y(b) = 1;
sol:=dsolve({ode,ics}, numeric):  # Solution of my ode

# First figure: solution of my ode in the interval (2,3)

odeplot( sol,[x, y(x)], x=a..b);  # I plot the solution in the interval (a,b)

# Here I define a second function

z:=x->-4.9354831550*exp(-(2/3)*x^(3/2))/(x^(1/4)*sqrt(Pi))+0.752447265e-1*exp((2/3)*x^(3/2))/(x^(1/4)*sqrt(Pi))+(16/153)*x^(7/6)*sqrt(Pi)*exp((2/3)*x^(3/2))+Pi*((1/2)*exp(-(2/3)*x^(3/2))*(-1+exp((2/3)*x^(2/3)))/(x^(1/4)*Pi)-(16/153)*x^(7/6)*exp((2/3)*x^(3/2))/sqrt(Pi));

# Here a code to plot this function z

forget(evalf):
Digits:=20:
P1:=plottools:-transform((x,z)->[x+a,z])(plot(expand(z(x+a)),x=0..1)):
forget(evalf): Digits:=4000:
P2:=plot(z, a..b, style=point,adaptive=false, numpoints=25):
plots:-display(P1,P2);  # Second figure

My question: I want one graph that shows the solution of my ode and the funciton z. ( i.e plot the two figures in only one graph).

Thanks for helping me.

 

 

 

 

 

 

 

 

A strange verical line in output of dsolve.Should be a comma in Jacobi SN function and comma's in invert Jacobi SN function.

 

Possible_Bug.mw

Can anyone help me confirm this?

Hello,

How to change the length underline in latex ?

For example in this environment :

$\underline{\mathcal{G}}$

 

Thank you,

Gérard.

I tried doing LinearSolve with my own matrices, thought maybe there was a mistake there so I copied the example from Maple's website and it won't execute. Instead of printing an output matrix, it just prints LinearSolve(input matrix 1, input matrix 2). I feel this is a very simple syntax mistake, but I can't figure it out!

Hello,

While doing some tests, we encountered an issue with LinearAlgebra[ConditionNumber], possibly caused by another routine in the LinearAlgebra package (MatrixInverse?). I include an example worksheet bug-maple.mw for easy testing.

To reproduce, you should start by creating this matrix:

restart;
with( LinearAlgebra ):
Digits := 50:
n := 4;
M := [ seq( cos( Pi*j/n ), j=0..n ) ];
V := VandermondeMatrix( M );

Now compute the condition number (infinity-norm) of V:

c1 := ConditionNumber(V);
c1 := simplify(%);
evalf(c1); # this gives exactly 40

We can still compute this exactly and get 40.

This is the same result as with linalg[cond]:

c2 := linalg[cond](V);
c2 := simplify(%);
evalf(c2);

Now increase the value of n to 5 and redo the test.
The exact result should be 120, but LinearAlgebra[ConditionNumber] gives the wrong result!
On the other hand, linalg[cond] gives the correct, exact result (after simplification).

n := 5; # this gives a wrong result :-(

We could use Norm(V) * Norm(Inv(v)) since this should be equal to the condition number.
But then it seems there's something bad inside the MatrixInverse routine.
Again, linalg[inverse] gives the correct, exact result.
So compare the two results:

n := 4;
simplify(MatrixInverse(V));
linalg[inverse](V);

Finally, to make matters even worse, ConditionNumber gives completely wrong results when using a float-matrix, while linalg[cond] does not:

n := 3;
V := VandermondeMatrix( evalf(M) );
c1 := ConditionNumber( V );
c2 := linalg[cond]( V );

For n=3, we get c1=10.6 and c2=16.
For n=4, we get c2=5 and c2=40.
For n=5, we get c1=68.07 and c2=119.999.

Is this what it looks like? With it being a really, really ugly bug?

-- Many thanks for your reply,

Franky

This is my code

 

am:=proc(dx,Nminus,Nplus)
global k_r,n,tau,a2,m;
k_r:=1/2;
a2:=a/2;
k=0;
u:=[]:
for n from Nminus to Nplus do
k:=k+1:
u(k):=max(exp((0.5*(k_r+1)^2)*0)*(exp(0.5*n*dx*(k_r+1))-exp(0.5*n*dx*(k_r-1))),0);
u:=[op(u),u(k)];
end do;
end proc;

 

I keep getting the error.

Error, (in am) invalid left hand side in assignment.

 

I would like to fill the array u with [u(1),u(2),...,u(Nplus-Nminus)]

 

Please help!

Dear friend,

Recently I noticed, that numerical integration returns different values for the same function.

For example the code

restart;
evalf(int((exp(x)*(4420*cos(4)*sin(4)-544*cos(4)^2+148147*exp(-1)-4225*cos(4)-215203)/(71825*exp(1)-71825*exp(-1))-exp(-x)*(4420*cos(4)*sin(4)-544*cos(4)^2+148147*exp(1)-4225*cos(4)-215203)/(71825*exp(1)-71825*exp(-1))+(32/4225)*cos(4*x)^2+(1/71825)*(4225+(2210*x-6630)*sin(4*x))*cos(4*x)+x^2+8434/4225)^2, x = 0 .. 1));

each time returns values

0.0005951015934
0.0005950850548
0.0005950974588
0.0005950960805
0.0005951297843 etc.

Maybe, evalf uses a stochastic algorithm for integration?

So I am trying to apply the Optimization function to a rather complicated problem I am currently working on, and having some trouble getting maple to cooporate. This is the part of the code that is giving me the error, with error included. All of the variables imputtet when calling OptimizeSpring are constants. If there is any other details I should add, please say so and I will add them promptly :) Thanks alot!
Maple problem

I suspect that it might be related to this suggestion, but I am not sure how to apply it http://www.mapleprimes.com/posts/95113-Optimization-Workaround-For-Operator-Form

Hey guys! Can anyone help me with solving one of these Differential Equations ?
Thanks.

!

[Here's the original Question, restored as best I could.--Carl Love]


restart; with(GroupTheory)

``

d := Perm([[1, 2, 3, 4, 5]]);

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

 

Perm([[1, 3], [4, 6], [5, 7]])

(1)

G := PermutationGroup({d, e});

GroupTheory:-PermutationGroup({thismodule, object}, )

(2)

H := Elements(G):

"A:=select(H[i]->PermOrder(H[i])=4,i=1..nops(H));"

Error, invalid operator parameter name

"A:=select(H[i]->PermOrder(H[i])=4,i=1..nops(H));"

 

 

 

``

``


[The question was, of course, How to avoid the error?--Carl Love]

Download subgrouplattice_(1).mw

Hi

how to say 

i from 1 to 4 in maple

for example

if I have this eqauation

and I need to sub i in this equation to get 4 equation

Many thank

I'm trying to solve a beam vibration problem. I am relatively new to Maple and trying to solve PDE's. I feel like I'm pretty close, but I don't understand what's wrong here.

This is my maple file.

Thesis_Pde2_attempt.mw

as a note, I made some simplifying assumptions. I am just using part of this equation since it is less complex. And my boundary conditions are simply supported on both ends so no displacement and no 2nd derivative at the ends.

 

Any help would be greatly appreciated!!

Hi!

I have a problem recently with running RootFinding:-Isolate inside a procedure which is run on threads. I have many polynomial systems to treat so I would like to balance computations between cores. Unfortunately, my code always breaks computation kernel with the error:

java.lang.NullPointerException

at com.maplesoft.mathdoc.model.WmiModelLock.acquireLock(Unknown Source)
at com.maplesoft.mathdoc.model.WmiModelLock.writeLock(Unknown Source)
at com.maplesoft.worksheet.connection.WmiOutputUpdateBuffer$UpdateSynchronizer.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

 

I wrote a small example below

f:=proc(n)

   local i;

   for i from 1 to n do
    try

      RootFinding:-Isolate([a^2+b^2-1/3c^2,a^2-1/3b^2+c^2-1/3,a^2-1/3b^2-1/3c^2+1],[a,b,c]):

   catch "":
     next:
   end try:
  end do:
end proc:

Threads:-Task:-Start ( null, Task[f,10000], Task[f,10000], Task[f,10000]);

 

I have no much of experiences with threads in Maple so I would not be surprise if I'm trying to do something completely wrong here. Any hint or advice will be appreciate. 

hi,

 

having some issue using the codegeneration function in maple. I have a script written in Maple that I would like to do in Python 2.7. I knew to maple and not sure if my syntax is incorrect or if the program doesnt support the conversion, as an example,

 

q[Fick] := proc (t) options operator, arrow; -hm0(t)*(ps(T[C5](t))-p[inf]) end proceq2 := m[C5](t)*Cp[C5l](T[C5](t))*(diff(T[C5](t), t)) = q[heat](t)

 

thanks

First 1192 1193 1194 1195 1196 1197 1198 Last Page 1194 of 2428