MaplePrimes Questions

I have a 3D plot as follows:

********************************************

with(plots);

plot3d(sin(x*y), x = -2 .. 2, y = -2 .. 2, axes = framed, colorscheme = ["zgradient", ["Blue", "Green", "Yellow", "Red"]]);

**********************************************

I want to plot its 2d contour (i.e. graph x-y plane).

How do I plot the contour of the graph in which the color of the contour lines have the corresponding colorscheme as the 3d plot?  Thank you. 

(P.S. This question has been updated)

 

i want to reverse this list using seq : :L := [2, 1, -7, 8];

when i try this way it works: seq(L[i], i = nops(L) .. 1, -1) but this way doesn't work :seq(L[nops(L)-i], i = 1 .. nops(L)), can anyone explain to me why ?

 

Hi everyone,

i want to to skip some code lines if a certain condition is/isn't given. I would prefer using a if..then expression. Is this possible.

Thanks for your help in advance.

 

I combined two animations as follow, but the dash line is turned into solid line. How can I solve this?

 

with(plots);

A := animate([X, X+t, X = -10 .. 10], t = -10 .. 10, color = red, linestyle = dash);

B := animate([X, t^2+X, X = -10 .. 10], t = -10 .. 10, color = blue, linestyle = solid);

display([A, B]);

I have two equations 

(i) x=t^2;

(ii) y=t^3;

I want to plot these two equations into a single graph [i.e. combine these two graphs: graph of x versus t (solid line, bule color), and graph of y versus t (dash line, red color)].

How do I customise the location of the legend? I want the legend located inside the blank space of graph (say, at top-right corner ) with vertical alignment. Thank you.

That is something simililar to the following graph:

Hello

I've got two functions wich will deliver me coordinates to use in a CAD Drawing Software (one for the x-coordinates and one for the y coordinates). So I need to plugin multiple values in the function, lets say 0..Pi/4 in 0.1 steps and I want to export the results in an Excel Sheet.
I tried it with subs but it not supports 0..Pi/4. So i need to program a loop or something like that. 

Has anyone done this before?

best regards
 

As is well known, a number n is a Charmichael number if and only if for every prime factor p of n, p-1 divides n-1. 

I would like to find a way to identify the following: Odd square free composite numbers n, having at least one prime factor p, with the property that p-1 divides n-1.

obviously the Carmichael numbers are a sub sequence of this. I have already managed to write a code to identify odd square free numbers divisible by the sum of their prime divisors and am interested to see how these data will differ from those of  this new sequence. 

My problem here is to find, given an odd square free number, a way to select and test each prime divisor for the above divisibility requirement. I hope someone can help, thanks in advance

Best regards

David Sycamore.

Hello,

I would like to combine and output different text modules that are saved in variables as strings but cannot get rid off the brackets and quotation marks

use DocumentTools in
textOne:="Hello";
textTwo:="How are you?";
SetProperty(Label0, caption,[textOne, textTwo]);
end use;

I alway get  ["Hello", "How are you?"] istead of Hello How are you?

If i remove the brackets [ ] after caption, the output is fine but only the first element appears. Hello

If I try the printf command, which apparently should remove the marks, the label won't output anything at all.

use DocumentTools in
textOne:="Hello";
textTwo:="How are you?";
SetProperty(Label0, caption,[printf(textOne), printf(textTwo)]);

end use;

How ist it done? Help would be much appreciated.

Thanks a lot!

Regards, Ben

I am working on a physics problem where I will need to generate random unitaries of size N x N.   

As I understand it this would require me to sample uniformly from U(N), where 'uniform' is in the sense of the Haar measure.  I believe this construction in Mathematica is called 'circular unitary ensemble' and was wondering if there was a similar routine in Maple or some simple code that would allow me to generate random unitaries of particular size.

 

I have the following two equations:

u=1-(8*(10.3968*t^2-5.8368*t*f-.229376*f^2-5.1984))/(4.56*t^2-2.56*t*f+.8192*f^2+2.28)^2;

x = f+t-(8*(-2.28*t+.64*f))/(2.28+2*(-t+.64*f)^2+2.56*t^2);

 

How can I plot the contours of u in the x-t plane (with its elevation value labelled in the line of each contour)?

 

Thank you a lot for your help!

Hi,

As in title: How can I generate random numbers sampled from, say, the logarithmic distribution (with a given value of the parameter)?

Thank you very much.

Anyone can help me to convert the following maple solution expressed by the hypergeom function to the LegendreP(n,b,x) or Q function?


 

restart

with(PDETools):

infolevel[pdsolve] := 3:

sol[1] := dsolve((1-x^2)*(diff(y(x), x, x))+n(n+1)*y(x) = 0)

y(x) = _C1*(-1+x^2)*hypergeom([3/4+(1/4)*(4*n(n+1)+1)^(1/2), 3/4-(1/4)*(4*n(n+1)+1)^(1/2)], [1/2], x^2)+_C2*(x^3-x)*hypergeom([5/4+(1/4)*(4*n(n+1)+1)^(1/2), 5/4-(1/4)*(4*n(n+1)+1)^(1/2)], [3/2], x^2)

(1)

convert(sol[1], LegendreP)

y(x) = _C1*(-1+x^2)*hypergeom([3/4+(1/4)*(4*n(n+1)+1)^(1/2), 3/4-(1/4)*(4*n(n+1)+1)^(1/2)], [1/2], x^2)+_C2*(x^3-x)*hypergeom([5/4+(1/4)*(4*n(n+1)+1)^(1/2), 5/4-(1/4)*(4*n(n+1)+1)^(1/2)], [3/2], x^2)

(2)

``

 

Download convert-Legendre.mw

 

https://math.stackexchange.com/questions/3254765/how-to-convert-a-hypergeom-function-to-the-legendre-function

I just want y(x) to be expressed in the form of LegendreP(n,b,x).

wave2.mw

 

Hellow!

 

I'm use Maple 13 (Linux)

I want save the value of u(x,t) at output file. This function is solution of PDE.

 

Can I get one file to each time value??

 

Ths

 

 

Hello!

I am truing to simplify kretchmann variable in the following worksheet:

 

 
M > 

# Obtaining Ricci and Kretchmann;
with(DifferentialGeometry):with(Tensor):

DGsetup([t, r, theta, phi], M);
g := evalDG(-(1-2*M*mu/r)^(1/mu)*dt &t dt+(1-2*M*mu/r)^(-1/mu)*`&t`(dr, dr)+r^2*(1-2*M*mu/r)^(1-1/mu)*(`&t`(dtheta, dtheta)+sin(theta)^2*`&t`(dphi, dphi)));
C := Christoffel(g):

`frame name: M`

 

_DG([["tensor", M, [["cov_bas", "cov_bas"], []]], [[[1, 1], -(-(2*M*mu-r)/r)^(1/mu)], [[2, 2], (-(2*M*mu-r)/r)^(-1/mu)], [[3, 3], r^2*(-(2*M*mu-r)/r)^((mu-1)/mu)], [[4, 4], r^2*(-(2*M*mu-r)/r)^((mu-1)/mu)*sin(theta)^2]]])

(1.1)

Rie := CurvatureTensor(C):
R := RicciScalar(g,Rie);
h := InverseMetric(g):
kretchmann := ContractIndices(RaiseLowerIndices(g, Rie, [1]), RaiseLowerIndices(h, Rie, [2, 3, 4]), [[1, 1], [2, 2], [3, 3], [4, 4]]);

2*(-(2*M*mu-r)/r)^(1/mu)*M^2*(mu^2-1)/(r^2*(2*M*mu-r)^2)

 

4*(-(2*M*mu-r)/r)^(-2*(mu-1)/mu)*M^2*(M*mu^2+2*M*mu+M-2*r)^2/(r^6*(2*M*mu-r)^2)+4*(-(2*M*mu-r)/r)^(2/mu)*M^2*(M*mu^2+M*mu-r)^2/((2*M*mu-r)^4*r^4)+20*(-(2*M*mu-r)/r)^(2/mu)*(M*mu+M-r)^2*M^2/((2*M*mu-r)^4*r^4)+4*(-(2*M*mu-r)/r)^(-2*(mu-1)/mu)*M^2*(M*mu^2+M*mu-r)^2/(r^6*(2*M*mu-r)^2)+4*(-(2*M*mu-r)/r)^(-2*(mu-1)/mu)*M^2*(M*mu+M-r)^2/(r^6*(2*M*mu-r)^2)

(1.2)
M > 

# simplification

M > 

simplify(normal(R),symbolic)

2*(-1)^(1/mu)*(2*M*mu-r)^((1-2*mu)/mu)*r^((-1-2*mu)/mu)*M^2*(mu^2-1)

(1.3)
M > 

simplify(kretchmann,size,symbolic)

4*(-(2*M*mu-r)/r)^(-2*(mu-1)/mu)*M^2*(M*mu^2+2*M*mu+M-2*r)^2/(r^6*(2*M*mu-r)^2)+4*(-(2*M*mu-r)/r)^(2/mu)*M^2*(M*mu^2+M*mu-r)^2/((2*M*mu-r)^4*r^4)+20*(-(2*M*mu-r)/r)^(2/mu)*(M*mu+M-r)^2*M^2/((2*M*mu-r)^4*r^4)+4*(-(2*M*mu-r)/r)^(-2*(mu-1)/mu)*M^2*(M*mu^2+M*mu-r)^2/(r^6*(2*M*mu-r)^2)+4*(-(2*M*mu-r)/r)^(-2*(mu-1)/mu)*M^2*(M*mu+M-r)^2/(r^6*(2*M*mu-r)^2)

(1.4)
M > 

 


 

Download RicciScalarKretchmann.mw

The problem is that I cannot obtain a good form of it. With Mathematica FullSimplify[] function I got the following form (LaTeX code incoming): $K =& 4 M^2 \Bigl(A-B r+C r^2\Bigr)(r-2 M \mu)^{\frac{2}{\mu}-4}r^{-\frac{2}{\mu}-4},\
    A =&M^2 (\mu (3 \mu+2)+7) (\mu+1)^2,\,B = 8 M (\mu+2) (\mu+1),\, C = 12$, i.e. terms $(r-2 M \mu)$ and $r$ got fully factorized. However, I could never achieve the same form in Maple. Any help?


I am sorry if this is a silly and many-times-answered question, but I tried consulting with Maple help and googling solutions without any success.

Regards,
Nick

First 676 677 678 679 680 681 682 Last Page 678 of 2425