## 270 Reputation

12 years, 116 days

## Hope, it will help...

Hello. First of all I'd like to note, that Physics package omits the problem of eigenvalues/eigenvectors finding. It is only linear algebra task and there is no any necessity to duplicate that procedures. You can get what you want by combininig possibilities of LinearAlgebra and Physics packages.

We start from the defining of matrix M:

 >
 (1)

Now we can define a quantum operator that corresponds to the matrix M:

 >
 (2)

Now we can bind standard (natural) basis with Ket-vectors in Dirac notations. I hope, it is that you ask, but I think it is a needless step.

 >
 (3)

Your ket-vector |Psi> I denote as K:

 >
 (4)

Now norm of K can be calculated:

 >
 (5)

Eigen values and eigen vectors we find with correspondend function of

Command

 >
 (6)

Eigenvectors in Dirac notations:

 >
 (7)

Checking block:

 >
 (8)

A probabilities to find a system described by vector K in states a[i] (i=1..n)  and the sum of that prababilities :

 >
 (9)

and finaly, the standard deviation:

 >
 (10)
 >

## Shorter...

`f := () -> `+`(args):`

## Better idea...

A better idea is to output the result in TextArea component rather than MathContainer component.

It can be done with the following string of code:

`str := cat(sprintf("a[0]=%e\n", a[0]), seq(sprintf("a[%a] = %e,     b[%a]=%e\n", i, a[i], i, b[i]), i = 1 .. Nmax)):DocumentTools:-SetProperty(TextArea0, value, str):`

where Nmax is defined.

## Maple's error!...

You should not use any CAS for such type of tasks.

Let alpha>0.

int(exp(I*alpha*x)/x,x=-infinity..infinity,CauchyPrincipalValue)=

int(cos(alpha*x)/x+I*sin(alpha*x)/x,x=-infinity..infinity,CauchyPrincipalValue)

int(cos(alpha*x)/x,x=-infinity..infinity,CauchyPrincipalValue)=0 (hope, you understand why)

Now

int(I*sin(alpha*x)/x,x=-infinity..infinity,CauchyPrincipalValue)=

=I*int(sin(alpha*x)/x,x=-infinity..infinity)= {y = alpha*x, alpha>0}

=I*int(sin(y)/y,y=-infinity..infinity)=I*Pi.

Hense:

alpha>0:

int(exp(I*alpha*x)/x,x=-infinity..infinity,CauchyPrincipalValue)=I*Pi;

alpha<0

int(exp(I*alpha*x)/x,x=-infinity..infinity,CauchyPrincipalValue)=-I*Pi;

## Why here?...

How does it concern Maple?

## Please delete this question. It contains...

Please delete this question. It contains a mistake. Sorry.

## Please delete this question. It contains...

Please delete this question. It contains a mistake. Sorry.

if -(4*pi)/3/sqrt(3)<x<-(2*pi)/3/sqrt(3) then -sqrt(3)*(x+4*pi/3/sqrt(3))<y<sqrt(3)*(x+4*pi/3/sqrt(3))

if -(2*pi)/3/sqrt(3)<x<(2*pi)/3/sqrt(3) then -2*pi/3<y<2*pi/3

if (2*pi)/3/sqrt(3)<x<(4*pi)/3/sqrt(3) then -sqrt(3)*(4*pi/3/sqrt(3)-x)<y<sqrt(3)*(4*pi/3/sqrt(3)-x)

Markiyan Hirnyk

I tried to upload a picture (png and jpg) of my region (hexagon) but unsuccesfully both times. Though there are empty places in my previous posts.

## Thank you...

Hi guys! Thank you for answers!

I've used the Jarekkk's solution as it fits my situation the best and it is exactly what I need. pagan's solution was practically the same.

Thank you chenyulue for explanation the difference between expression and function. However, I don't agree with you that my problem was mixing the operators with expressions. I've used operators and expressions properly, IMHO.

Thanks again.

 Page 1 of 1
﻿