Items tagged with square

Feed

hi,

here a comlicated formula,how i simplify

thanks  a lot.

``

f := (kappa*omega^2+omega^3)*(Y+(-sqrt(N)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+sqrt(N)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)/(2*(kappa*omega^2+omega^3)))^2/(2*omega)+(-kappa*omega^2+omega^3)*(X+(sqrt(N)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+sqrt(N)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)/(2*(-kappa*omega^2+omega^3)))^2/(2*omega)+(Omega*N*cos(theta[2])*omega+Omega*N*cos(theta[1])*omega-P__X^2*kappa+P__X^2*omega+P__Y^2*kappa+P__Y^2*omega)/(2*omega)-(sqrt(N)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+sqrt(N)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)^2/(8*omega*(-kappa*omega^2+omega^3))-(-sqrt(N)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+sqrt(N)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)^2/(8*omega*(kappa*omega^2+omega^3))

(1/2)*(kappa*omega^2+omega^3)*(Y+(-N^(1/2)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+N^(1/2)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)/(2*kappa*omega^2+2*omega^3))^2/omega+(1/2)*(-kappa*omega^2+omega^3)*(X+(N^(1/2)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+N^(1/2)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)/(-2*kappa*omega^2+2*omega^3))^2/omega+(1/2)*(Omega*N*cos(theta[2])*omega+Omega*N*cos(theta[1])*omega-P__X^2*kappa+P__X^2*omega+P__Y^2*kappa+P__Y^2*omega)/omega-(1/8)*(N^(1/2)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+N^(1/2)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)^2/(omega*(-kappa*omega^2+omega^3))-(1/8)*(-N^(1/2)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+N^(1/2)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)^2/(omega*(kappa*omega^2+omega^3))

(1)

``

(1/2)*(kappa*omega^2+omega^3)*(Y+(-N^(1/2)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+N^(1/2)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)/(2*kappa*omega^2+2*omega^3))^2/omega

(2)

``

    f is a complicated function,i want to make it more simplify,but i want to keep square style,

 let coefficients of X and Y keep one unit,and simplify terms  containd special symbol of omega

 

Download Q1119.mw

it what i wanted.

The word command for square root is sqrt.  What is the word command for square?  How to square all the values in a list?

 

I ran into a problem with the physics package that I subsequently solved. But I am wondering whether this would be a candidate for an SCR and/or be considered a bug.

The calculation I am trying is actually (so far) very simple.

I define a Hamiltonian H:

H := sqrt(p_^2*c^2+m^2*c^4); # note the square of vector p_

p_:=p1*_i+p2*_j+p3*_k;

H;

So far so good. Now I want to take the differentials of H against the components of p:

diff(H,p1) assuming c::real;

Hmm... I am not sure why the p2 and p3 still show up; but then, the product between the unit vectors should be 0 for different ones and one for equal unit vectors so maybe this is ok.

But H behaves weird: I can simplify it:

but if I try to do anything with it, it barfs:

dH+0;

Error, (in Physics:-Vectors:-+) invalid operation * between vectors _i and _j

As it turns out the issue is the square of the vector p_. Maple (or rather, Physics) does not recognize that it needs to expand p_^2 as p_.p_ and seems to treat is like p_*p_.

I would like Edgardo---& others more experienced with the Physics package than I am---to look at this. I do not understand the Physics package well enough to judge whether overloading the exponentiation operator to make this work is the right thing.

The example works once I replace p_^2 by p_.p_. But the ^2 notation is fairly standard usage so it feels slightly awkward.

Thanks,

Mac Dude.

Derivation_of_H.mw

Hi,

I m trying to simplify an expression involving square roots in Maple. But instead of giving the expected output it is not simplifying it. Please find the attached maple file for reference. I calculated manually and the result is 1. Please help me out for this. Thanx in advance.

Regards

Sunit

restart

temp := (1/2)*(a*r*t-b*p)*sqrt(p+v*sqrt(a*r))*sqrt(b)/(sqrt(a*b*r*t)*sqrt(a*r*t*(p+v*sqrt(a*r))))+(1/2)*(a*r*v*t-v*b*p+p*t*sqrt(a*r)-b*v^2*sqrt(a*r))*sqrt(b)/(sqrt(a*b*r*t*(p+v*sqrt(a*r)))*sqrt(t*(p+v*sqrt(a*r))))+(1/2)*b*(p+v*sqrt(a*r))/(a*r*t)

(1/2)*(a*r*t-b*p)*(p+v*(a*r)^(1/2))^(1/2)*b^(1/2)/((a*b*r*t)^(1/2)*(a*r*t*(p+v*(a*r)^(1/2)))^(1/2))+(1/2)*(a*r*v*t-v*b*p+p*t*(a*r)^(1/2)-b*v^2*(a*r)^(1/2))*b^(1/2)/((a*b*r*t*(p+v*(a*r)^(1/2)))^(1/2)*(t*(p+v*(a*r)^(1/2)))^(1/2))+(1/2)*b*(p+v*(a*r)^(1/2))/(a*r*t)

(1)

simplify(temp)

-(1/2)*(-(p+v*(a*r)^(1/2))^(1/2)*b^(1/2)*(a*b*r*t*(p+v*(a*r)^(1/2)))^(1/2)*(t*(p+v*(a*r)^(1/2)))^(1/2)*a^2*r^2*t^2+(p+v*(a*r)^(1/2))^(1/2)*b^(3/2)*(a*b*r*t*(p+v*(a*r)^(1/2)))^(1/2)*(t*(p+v*(a*r)^(1/2)))^(1/2)*a*r*t*p-b^(1/2)*(a*b*r*t)^(1/2)*(a*r*t*(p+v*(a*r)^(1/2)))^(1/2)*a^2*r^2*t^2*v+b^(3/2)*(a*b*r*t)^(1/2)*(a*r*t*(p+v*(a*r)^(1/2)))^(1/2)*a*r*t*v*p-b^(1/2)*(a*b*r*t)^(1/2)*(a*r*t*(p+v*(a*r)^(1/2)))^(1/2)*a*r*t^2*p*(a*r)^(1/2)+b^(3/2)*(a*b*r*t)^(1/2)*(a*r*t*(p+v*(a*r)^(1/2)))^(1/2)*a*r*t*v^2*(a*r)^(1/2)-b*(a*b*r*t)^(1/2)*(a*r*t*(p+v*(a*r)^(1/2)))^(1/2)*(a*b*r*t*(p+v*(a*r)^(1/2)))^(1/2)*(t*(p+v*(a*r)^(1/2)))^(1/2)*p-b*(a*b*r*t)^(1/2)*(a*r*t*(p+v*(a*r)^(1/2)))^(1/2)*(a*b*r*t*(p+v*(a*r)^(1/2)))^(1/2)*(t*(p+v*(a*r)^(1/2)))^(1/2)*v*(a*r)^(1/2))/((a*b*r*t)^(1/2)*(a*r*t*(p+v*(a*r)^(1/2)))^(1/2)*(a*b*r*t*(p+v*(a*r)^(1/2)))^(1/2)*(t*(p+v*(a*r)^(1/2)))^(1/2)*a*r*t)

(2)

``


Download question.mw

Is it possible to have Maple display square brackets, instead of a subscript ? (Seperately, I would still like to use subscripts. So, I don't want everything in square-bracket notation.)

 

Input: 

x[n]

 

Evaluates to:

x[n]

 

Hi,

 

The default way a prompt shows on my maple is

 

[> blah blah blah

 

but i see in many worksheets including maple help pages that it shows as

 

> blah blah blah

 

My Question is how do i remove that left square bracket "[" from appearing ?

Hello people in mapleprimes,

I want to ask a question about modification of expression.

Basically, what I want to do is to change the expression of sqrt((-a)^2) to sqrt(a^2).

 

The expression I want to modify is this:

 

aa:=phi[n, j] = a[j, D]-a-sqrt((-a[j, D]+a+tau[n, j])^2+4*gamma*f[c, n, j]/L[j])

 

I want to change this to 

 

phi[n, j] = a[j, D]-a-sqrt((a[j, D]-a-tau[n, j])^2+4*gamma*f[c, n, j]/L[j])

 

To do this, I wrote as 

subs(sqrt((-a[j, D]+a+tau[n, j])^2+4*gamma*f[c, n, j]/L[j]) = sqrt((a[j, D]-a-tau[n, j])^2+4*gamma*f[c, n, j]/L[j]), phi[n, j] = a[j, D]-a-((-a[j, D]+a+tau[n, j])^2+4*gamma*f[c, n, j]/L[j])^(1/2))

 

Or, I wrote as 

subs(op([2,3,2,1,1],aa)=(a[j, D]-a-tau[n, j])^2,aa)

 

If there is better ways, please tell me them.

 

Best wishes.

 

taro

 

Hi all,

my problem concerns operation with complex number in Maple 18. The issue is the following:

i define this complex: c:=a+i*b

then i compute the square: sort(evalc(c^2))

and the output is: a^2+2*i*ab-b^2

So, how can i obtain an output like the following?  a^2-b^2b^2 +a*i*ab

In other word i want an output where the real part precede the complex part.

thank you in advance :)

I am trying to use Maple to produce an image that will be part of a math paper.  The final image must be in .eps format.  Whenever I produce a plot in Maple17 and click on it, it looks like the image has the shape of a square (regardless of what's inside it), perhaps with a lot of empty space.  I want an image without a lot of empty space, and I'd like Maple to do this.  If I crop a square image using some other application, it is not going to improve the quality of the image and might hurt it.  

If the answer to question in the Title is "no", can anyone suggest a good way to produce a good .eps image from a Maple plot that is cropped properly to eliminate as much empty space as possible?  I have Photoshop, but I don't know if this is the best way to go.

I wrote a toy file that plots a simple curve.  I'll upload it and provide a link to it.  If you execute the code and click on the image, you'll see that it is a square with a lot of empty space.

Nov122013.mw


restart:

with(plots):

p1:=plot(x^2,x=0..1,scaling=constrained,view=[-4..5,-1..3]):

display(p1);

 

 

 

 

 


Download Nov122013.mw

 

Hi again! :-)

I just ran into another problem with units...

I want to remove all units from an expression like this one

V[dis]:=(3/100000)*Unit('m')^3+0.1e-2*Pi*Unit('m')^2*(.112-0.28e-1*cos(theta)-sqrt(0.7e-2-0.1e-2*sin(theta)^2))

I've tried with convert(V[dis],'units_free') but Maple wont let me use that command, when the expression contains units in powers (square and cubic).

I guess there is another way arround, but how?

Best regards

Page 1 of 1