Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Assume we have an expression in several variables, x,y,z,..., where all of them are function of one parameter, t, for an example consider the following simple expression;

f := 2*y(t)*(diff(x(t), t))^2+3*(diff(x(t), t$3))-3*x(t)*(diff(y(t), t));

Is there any command or a way to ask Maple to give the highest order of derivation of x or y with respect to t in the expression? For example in the above example, the answer for x is 3 and for y is 1. If we remove the second term, then the answer for x should be 1.

Hello,

I'm confused about Maple's adjoint function (in the DEtools package). When I take the adjoint of the derivative operator:

DEtools:-adjoint(Dx, [Dx, x])

 

I get back simply "Dx". However, doing the calculation by hand and integrating by parts seems to indicate that this should return the negative of Dx. The inner product I'm using is int(f(x)*conjugate(g(x)), x=0..1). Is Maple perhaps using a different inner product? Or is this a generalization that I'm unaware of? Or is it perhaps just a bug?

 

Thanks!

Hi,

I want to find the real and Imaginary part of this equation, without losing the exponential forms. 

(I*(1/2))*(I*R*C*C1*omega__n-L__1*C*exp(I*eta*T[2])*e^2*eta^2*C2-5*L__1*C*exp(I*eta*T[2])*e*eta*omega__n*C2+(3*I)*R__n*C*C1^2*C2*omega__n-3*gamma__1*C*C1^2*omega__n^2*C2-13*L__1*C*exp(I*eta*T[2])*omega__n^2*C2*(1/2))/omega__n

If I use 

evalc(Im(D1C1))

then the exp changes to sin or cos forms. How can I prevent it?

Regards,

Bahar

I have the sequence f(n) satify the conditions

f(n) = 4*f(n-1)-2*f(n-2), f(1) = 1, f(2) = 28.

I find the formula of f(n)

rsolve({f(1) = 1, f(2) = 28, f(n) = 4*f(n-1)-2*f(n-2)}, {f})


I got

f(n) = (-25*sqrt(2)*(1/4)-6)*(2-sqrt(2))^n+(25*sqrt(2)*(1/4)-6)*(2+sqrt(2))^n

Is there an integeral number k satisfy the equation f(n) = k^2, (k <> 0) ?

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.

 

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

 

 

First 701 702 703 704 705 706 707 Last Page 703 of 2249