MaplePrimes Questions

How do you define funtion y"+2y'=0 y(0)=1.solve this question using in maple command!

Is it possible to use Unicode characters in  textplot  command? In the application that I'm developing, the signs of the chess pieces should be used.

In Maple help, there are many examples, which shows the input and output in 2D. I like to see the input in 1D (since I use worksheet style, I prefer to use input in 1D, but keep output as 2D).

So it is easier for me to see the input part of the command in the help pages as 1D, since it will match what I will type.

Is there a way to change this? I searched settings and googles and see nothing yet. I am using 17.02 on windows.

I am trying to figure out how to enter tensors using the new Physics package in 17.02. For my first, presumably simple example, I am trying to reproduce the Lorentz transformation in Special Relativity:

 

Xμ' = Λνμ Xν

where

Λνμ = [{γ, -γβ, 0, 0}, {-γβ, γ, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}]

Xν = [x0, x1, x2, x3]T

My Λ tensor Defines just fine; I do

Lambda[nu, `~mu`] = (Matrix(4, 4, {(1, 1) = gamma, (1, 2) = -gamma*beta, (1, 3) = 0, (1, 4) = 0, (2, 1) = -gamma*beta, (2, 2) = gamma, (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 1}))

(which, upon <Enter> is labeled (1)), and then

Define((1))

and this suceeds. However, when I do the X vector:

X[`~nu`] = (Vector(4, {(1) = x0, (2) = x1, (3) = x2, (4) = x3}))

which is labeled (2), then the Define((2)) function returns the following error:

Error, (in Physics:-Define) expected right-hand-side of tensor definition as an algebraic tensorial expression, or a Matrix or an Array, representing the evaluation rule for the tensor X[`~nu`]; received: Vector(4, {(1) = x0, (2) = x1, (3) = x2, (4) = x3})

So my question is, what is the correct syntax for Defining or declaring a vector to be a tensor?

(Also, incidentally, why is the covariant (superscript) index ~nu being displayed as a subscript when Maple echoes my entry?)

Thank you,

Kevin

So, newb question here. I've done my best to debug this line of code, but to no avail. For some reason this function is NOT getting solved correcting for the zeros:

cos(L*x) - x*sin(L*x)

 

This is not an extremely complex equation either, so I'm at a loss for why my while loop continues to sit there forever. I've got it set to find N number of zeros, but it'll just keep going forever never finding any zeros. I've tried mixing up the start point, and even changed the range which it's searching for them, but nothing seems to get me any closer. Please help!

 

> restart; with(plots);
> a := 0; b := 1/2; N := 5; w := 1; L := b-a;

Eigenvalue equation
> w := cos(L*x)-sin(L*x)*x;
> plot(w, x = 0 .. 50);

> lam := array(0 .. N+1);

> nn := 0; kk := 5; while nn < N do zz := fsolve(w(x) = 0, x = kk .. kk+1); if type(zz, float) then printf("lam(%d)=%f\n", nn, zz); lam[nn] := zz; nn := nn+1 end if; kk := kk+1 end do

 

I have an expression of the following structure (the real case is much more complicate but this will illustrate):

expr:=(a+q)*A+b*q*B;

I am looking for a way to change only the first occurrence of q. In my specific case, q << a so I can approximate that instance of q with 0. This I cannot do for the second occurrence of q. Note that the trivial subs(a+q=a) does not work for my real case as a is too complicated (meaning that while in principle I can do it, it looks extremely messy and in any case would not be general).

I can probably concoct something using op(#,expr) and has, but I am wondering whether there is an easier and faster way.

TIA,

Mac Dude

How would I write a function that produces true if a vector/ line satisfies 3 linear inequalities and false if it does not satisfy all 3 linear inequalities? Ie
If the vector <m,n> satisfies ax+by+c>0, dx+ey+f>0 and gx+hy+i>0 then the function returns true, and if it does not satisfy one or more then it returns false? Thanks very much for your time.

I'm trying to use the CriticalPoints command from the Student[Calculus1] package to determine the critical points of f(x) = x^2 * ln(x).

 

with(Student[Calculus1]):

f := proc (x) options operator, arrow; x^2*ln(x) end proc:

`assuming`([CriticalPoints(f(x))], [x > 0])

[0, exp(-1/2)]

(1)

``

My issue is this. A critical point is defined as a value of x in the domain of f(x) where either f'(x)=0 or f'(x) does not exist. Clearly x=0 is not in the domain of f(x) = x^2*ln(x). How may I "trick" Maple into returning only the value exp(-1/2)?  As seen above, my attempt to use the assuming command proved futile.

More troubling, however, is whether or not the CriticalPoints command is using the correct definition to compute critical points. Can anyone shed some light on this?

 

Download critpts.mw

Can someone explain to me, if you can, how the Euler angles on the plot interface work?

 

It looks like Phi is the rotation around z, Theta is the rotation around x, and Psi is around y. I'm trying to use matrices to compute the vector that is pointing towards your face as you're looking at the plot with the given Euler angles.


X := Matrix(3, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = cos(phi), (2, 3) = sin(phi), (3, 1) = 0, (3, 2) = -sin(phi), (3, 3) = cos(phi)});


Y := Matrix(3, 3, {(1, 1) = cos(theta), (1, 2) = 0, (1, 3) = sin(theta), (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (3, 1) = -sin(theta), (3, 2) = 0, (3, 3) = cos(theta)});


Z := Matrix(3, 3, {(1, 1) = cos(psi), (1, 2) = sin(psi), (1, 3) = 0, (2, 1) = -sin(psi), (2, 2) = cos(psi), (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1});

and computing X*Y*Z*e3

 

TIA!

How do I define a function from a graph in a plot? 

Or how do I find the intersection between two lines? I have to find the intersection of 2 lines in a graph, while one of these lines consists of 2 different equations dependent from the same variable. 

 

Thanks in advance. 

I don't know how to write a function that determines whether a non-zero vector intersects a triangle with given vertices. If anybody could help me write a function that satisfies this so that the function returns true if the vector spanning the line intersects the triangle and returns false if it doesn't I would be greatly appreciative.

How to find the integral int(-2*log((1+sqrt(s))/(1-sqrt(s)))/((-s^2+1)*(s-1)*sqrt(s)), s = 0 .. z)

 

any general method to eliminate the derivative of lambda1,lambda2,lambda3

a:= -(diff(lambda1(t), t))+lambda3(t);
b:= -lambda1(t)-(diff(lambda2(t), t))+4*lambda3(t);
c:= -lambda2(t)+3*lambda3(t)-(diff(lambda3(t), t));

result in 2*lambda1(t) - lambda2(t) + 2*lambda3(t) = 0;

why are the results of gcd(x^2+1,x+1) mod 2 and Gcd(x^2+1,x+1) mod 2 in maple  different ? 

I know the  `mod`(gcd(x^2+1, x+1), 2);
                               1
`mod`(Gcd(x^2+1, x+1), 2);
                             x + 1

but how do you explains this question? give me reason?

solve({[(alpha[1]-alpha[2]*lambda)*sqrt(x)+p[2]*lambda]*[k[1]*(1-lambda^2)+2] = p[1]*(2*k[1]*(1-lambda^2)+2), [(alpha[2]-alpha[1]*lambda)*sqrt(x)+p[1]*lambda]*[k[2]*(1-lambda^2)+2] = p[2]*(2*k[2]*(1- lambda^2)+2)}, [p[1], p[2]])

Warning, solutions may have been lost

 

 

could you help me please to find a solution for this issue...

I would like to thank you in advance 

Best regards,

D.L.

 

 

First 1516 1517 1518 1519 1520 1521 1522 Last Page 1518 of 2427