MaplePrimes Questions

I'm trying to implement the QR algorithm to find the Eigenvalues of the input matrix which will be forwarded to another implementation (of the SVD alg.) to find the singular values. My implementation goes as follows:

1. feeding input: A::Matrix(datatype=float) # a bidiagonal matrix
2. construct input matrix for the QR alg. of matrix A and Z (zeros of size A): C := Matrix([[Z,Transpose(A)],[A,Z]], datatype=float); # therefore C should be symmetric
3. find the eigenvalues of matrix C with an implementation of the QR alg.:

for k from 1 to 400 do
Q, R := QRDecomposition(C);
C:=R.Q;
end do:

At this point, the eigenvalues of C should be placed in the diagonal of the matrix, but they're randomly placed around the diagonal, with only ~0 elements (like 2,xxx * 10^(-13)) in the diagonal.

If anyone knows how to resolve this, let the knowledge flow through. Any help will be appriciated, thanks in advance.

Hi, I'm having trouble trying to make a loop stop when a variable hits certain value. No, break doesn't help much as the code is intended to be executed w/ "execute the entire worksheet" command, and break only stops the calculation on this especific execution block (I'm using maple 18 btw).

Any ideas would be highly apreciated.

Hi

Dear friends

I use the command "dsolve(`union`(deq, initial), numeric, method = lsode)" for solving a fourth order ODE.

But for some numerical values of the parameters the bellow error is occurred:

" an excessive amount of work (greater than mxstep) was done ".

I have three questions:

1- how can I increase the mxstep from default amount (i.e. 500) to a greater value?

2- how can I ensure that the absolute error is less than 10E-6?

3- when I use lsode which way of numerical solution is applied (Euler,midpoint, rk3, rk4, rkf, heun, ... )?

 

Thanks a lot for your help

 

L(1):=[1,2,3]:

L(2):=[A,B,C]:

sum(nops(L(i)),i=1..2):

 

The real result of the sum is : 6.

Maple's result is : 2.

Yes, Maple gives an error.
But it doesn't matter, Maple is the most extraordinary software of the world !!!

Hi 

My teacher (im studing Technology Management and Marine engineering) only allow that we use maple if we display the results between calculations. Is that posible:

 

a := 4;

b := 5;

Instead of :

a+b=9

I want it displayed as:

a+b= 4+5= 9;

or just

4+5 = 9; where a and b are Automatically replaced with the respective values, when i run the !!! button

 

A lot of my calculations are done by defining the variables in the top. 

Any ideas??

 

Thanks in advance.

 

Best regards  Carsten Moller

 

 

 

Please check why Maple is not returning location of Minima in following case:

 

-0.6159648936e-1*sin(.9960622471*x)+0.1077739351e-1*sin(1.992124494*x)-0.6872829504e-3*sin(2.988186741*x)+0.3984248988e-4*sin(3.984248988*x)

-0.6159648936e-1*sin(.9960622471*x)+0.1077739351e-1*sin(1.992124494*x)-0.6872829504e-3*sin(2.988186741*x)+0.3984248988e-4*sin(3.984248988*x)

(1)

plot(-0.6159648936e-1*sin(.9960622471*x)+0.1077739351e-1*sin(1.992124494*x)-0.6872829504e-3*sin(2.988186741*x)+0.3984248988e-4*sin(3.984248988*x), x = -3.2 .. 3.2)

 

readlib(extrema):

{-0.6447467154e-1, 0.6447467152e-1}

(2)

Minima := op(1, {-0.6447467154e-1, 0.6447467152e-1}); 1; Maxima := op(2, {-0.6447467154e-1, 0.6447467152e-1})

-0.6447467154e-1

 

0.6447467152e-1

(3)

minimize(-0.6159648936e-1*sin(.9960622471*x)+0.1077739351e-1*sin(1.992124494*x)-0.6872829504e-3*sin(2.988186741*x)+0.3984248988e-4*sin(3.984248988*x), x = 0 .. 3.5, location)

minimize(-0.6159648936e-1*sin(.9960622471*x)+0.1077739351e-1*sin(1.992124494*x)-0.6872829504e-3*sin(2.988186741*x)+0.3984248988e-4*sin(3.984248988*x), x = 0 .. 3.5, location), {}

(4)

Why Maple is not returning location of minima?

 

Download Location_for_Max_Min.mw

Regards

y := 0.11083e-1+0.66489e-1*cos(n*x)+0.22089e-1*cos(2*n*x)+0.8903e-2*cos(3*n*x)-0.293e-3*cos(4*n*x)?

I used SOLVE to solve an inequality. The result shows things like this: 

How can I read the upper bound to a variable? 

THanks!

I can not find a cumulative sum procedure in maple2016.

I want to compute the cumulative sum of a list or vector.

A:=[1, 2, 3, 4];

cumsum(A); ## or whatever the maple function is... 

[1,3,6,10]

Tom Dean

Is there currently any way to perform Feynman integration after applying the Feynman rules for various electrodynamics processes? 

Can maple 2016 do renormalization of integrals? If we cannot currently do any of these, when will this features be available? Thank You very much.

Hi guys,

I'm doing some heavy analytical calculations, as the calculations take hours to finish, I want to save the results, which is easily done, however when I load the saved results, it behaves differently, somehow I can no longer substitute the variables. I extracted the main problem into the following minimal working example.

Thanks for any useful insight,

Cheers, Sören

restart():

assume(`in`(n, real))

x := n+1

n+1

(1)

subs(n = 1, x)

2

(2)

save x, "./myfunction.m";

read "./myfunction.m";

x

n+1

(3)

Now we can't substitute n in x:

subs(n = 1, x)

n+1

(4)

subs(n = 1, n+1)

2

(5)

y := x:

Download assume_and_save.mw

Hello,

I would like to export some plots from a worksheet as vectorial picture.

However, I didn't find how to export plots as .svg ou .emf files. These files are accepted by visio which is the software I use for the creation of my figures.

Is it possible to export picture as a vectorial picture and yes, how ?

Moreover, I would like these kind of extensions that is to say .svg and .emf

Thanks a lot for your help.

I thought I'd try the latest version of the physics package. I am trying to look at a "simple" function with quantum operators, Taylor expand it, and write terms in normal order (i.e. Dagger(a) terms before a, and Dagger(b) before b), but am having no luck at all. Not sure if this is possible with the current version.

I am also having a couple of weird "interface issues" after loading the package:
1) See the printout from Setup() command - here Dagger(a) and Dagger(b) is sometimes displayed with a bar above the names, but other times (i.e. during other runs) with daggers.
2) Maple gets "stuck" on one of the lines - meaning I press enter, but it does not jump to the next execution block.

Both of these issues are outlined with "NOTE" in the worksheet.

Ultimately, the interface issues are of no concern to me, but I am pretty curious if the current version of the physics package can do what I need?

thanks

Worksheet:  commutator_stuff.mw

---------------------------------

 

 

I'm trying to solve a 2nd order system of pde's with couplded BC but it gives me the following error

Error, (in pdsolve/numeric) initial/boundary conditions must be defined at one or two points for each independent variable

Here is the code

> T01 := 273; T02 := 26; L1 := .1; L2 := .2; h1 := 100; h2 := 200; k1 := 1; k2 := 2; rho1 := 1000; rho2 := 2000; c1 := 0.1e6; c2 := 0.2e6; alpha1 := 1; alpha2 := 2

> PDE := {diff(T1(x, t), t) = (diff(T1(x, t), x, x))/alpha1, diff(T2(x, t), t) = (diff(T2(x, t), x, x))/alpha2}

> IBC:={k1*(D[1](T1))(L1, t) = k2*(D[1](T2))(L1, t), T1(L1, t) = T2(L1, t), T1(x, 0) = T02, T2(x, 0) = T02, (D[1](T1))(0, t) = -h1*(T1(0, t)-T01)/k1, (D[1](T2))(L1+L2, t) = h2*(T2(L1+L2, t)-T02)/k2}

> pds := pdsolve(PDE, IBC, numeric)

Its basically a 1D heat equation in a 2 layers plate with conduction BC on both sides

Coding in key generation of RSA Cryptosystem

message :=123456;

u := nextprime(RandomTools[Generate](integer(range = 10^100 .. 10^(110-1))));

v := nextprime(RandomTools[Generate](integer(range = 10^100 .. 10^(110-1))));

N := u*v;

phi := (u-1)*(v-1);

In RSA cryptosystem, the encryption or decryption of message only can be existed between range 1<=message<=N. This means that if the value of message bigger than N value then we can't get back the original value when performing decryption.Thus, wanna to ask that how can we create a coding so that the system will recognise the random integer u and v whether lie between range 1<=message<=N, means wanna crete a coding that if  N>=message then it will continue to the phi step whereas if message>=then the system need to regenerate the u and v until it satisfy the condition  1<=message<=N .Thus please help as i am a beginner in Maple.Thanks.

First 1125 1126 1127 1128 1129 1130 1131 Last Page 1127 of 2428