MaplePrimes Questions

Hi,

I do not really understand the difference between annrow operator and unapply.
From the help pages it seems that unapply "creates" an arrow operator and thus that they could be two different ways to do the same thing.


restart:

f := x[1]+y[1]:

a := indets(f):                  # just because f can be more complex than the f above
g := (op(a)) -> f;              # generates an error, "operators not of a symbol type"
h := unapply(f, (op(a)))   # ok, but with a strange output
     h := (x__1, y__1) -> x__1+y__1

So it seems that Maple has transform by itself the indexed x[1] and y[1] into symbols x__1 and y__1.

Could you explain me what happened exactly ?

TIA

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 have an expression and want to find its derivative respect to T[1] but not T[2], for example: 

u[1](T[1], T[2], T[3]):=exp(T[1]*I)

If I find the 

diff(u[1](T[1], T[2], T[3]), T[1], T[2])

I would like to get something like this:

D__1*diff(u[1](T[1], T[2], T[3]), T[1])

instead of the derivative respect to T[2], which makes the result to be zero.

I need an expression that I can do other things with it.

You might say why do you just remove the diff of T[2], well I want to automate my code and this is part of the expression so I cannot write something else.

Regards,

Bahar

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.

 

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

First 684 685 686 687 688 689 690 Last Page 686 of 2433