Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I've trying to compose operators in Maple and I've hit a snag. Here's a simplified example:

dx := f -> diff(f, x);
dy := f -> diff(f, y);
eq1 := x * dy
eq2 := y * dx

eq1(eq2)

The output of the final statement is x(y*dx)dx. It took me a while to figure out that Maple is treating it like so:

(x * dy)(y * dx)
(x(y * dx)) * (dy(y * dx))
(x(y * dx)) * (dx)
x(y * dx) * dx

The problem is I don't want it applying anything to x, the expression should reduce to x * dx. Same as if x was replaced by a constant, for example:

(4 * dy)(y * dx) = 4 * dx

In the context of my full code, Maple already knows x is not "appliable" e.g. is(x::appliable) returns false. How do I tell Maple to treat x as not-a-function?

Hello everyone,

How would I do something like this in Maple:

i.e. do the product (or sum) from k=1 to n, skipping the value i. This one has me really scratching my head...

Thanks for your help!


 

``

lambda := .3:

omega := lambda+mu+xi:

alpha := 2*sqrt(lambda*mu)

.9165151390

(1)

``

B[1] := BesselI(k-1, alpha*(u-y))

BesselI(k-1, .9165151390-.9165151390*y)

(2)

B[2] := BesselI(k+1, alpha*(u-y))

BesselI(k+1, .9165151390-.9165151390*y)

(3)

``

F := evalf(Int(sum((B[1]-B[2])*exp(-omega*(u-y)), k = 1 .. infinity), y = 0 .. u))

Int(sum((BesselI(k-1., .9165151390-.9165151390*y)-1.*BesselI(k+1., .9165151390-.9165151390*y))*exp(-1.200000000+1.200000000*y), k = 1 .. infinity), y = 0. .. 1.)

(4)

``

``

``


 

Download int.mw

when i write :

I want answer me   '2'

but it answer on this way:

what i should do for it answer just '2' and ynderstand dont need conjugate 'x and lambda'

Could be helpful to see again those worksheets about programming in Maple.

It was back in 2000-2004 that have seen these workssheets on the Maple website

 I looked at Maple website, but nothing to find anymore for those programming worksheets?

conj := conjugate; d := a*x+b*y-c = 0; z := x+I*y; evalc(z+conj(z)); evalc(z-conj(z)); d := expand((1/2)*a*(z+conj(z))+b*(z-conj(z))/(2*I))-c; is(d = z(a-I*b)+conj(z)*(a+I*b)-2*c); varpi = a+I*b; is(d = z*conj(varpi)+conj(z)*varpi-2*c); How to perform calculations correctly ? Thank you.

Unfortunately, I can't solve the problem in MAPLE that appears in the last line of the picture (0=1 instead of a0=1) unless I write a0 seperately and add the partial sum starting from k=1 to it.

I assume the problem is with 00 in the power series but since MAPLE defines 00:=1 I'm not sure about it. Anyone knows a better solution or can tell me if I made a mistake somewhere?


 

How to get the inflection points for this function.?

fprime_expr:=x^sin(x)*(cos(x)*ln(x)+sin(x)/x);

i tried symbolic and numeric , but no answer 

for X:= solve( fprime_expr =0, x);

 

This worksheet plots the non-overlapped images of two spheres, but plotted procedure p fails to successfully pass the choice of color to the implicitplot3d command.

How can this be accompished?

Sphere_exclusions.mw

Hi there!

I am trying to express a given polynomial not in terms of the monomes, but in terms of some orthogonal polynomials p_i, i=1..n.

If I have let's say x^5+x^4+2x^2 then I first divide that term by p_5, then the remainder by p_4 and so on, until I have the wanted coefficients. My problem is, that Maple complains about my code:

Error, (in Basenwechsel) invalid input: op expects 1 or 2 arguments, but received 0.

NEUZMinus:= proc(Unten, Oben, f,G,Liste,n)::real;
  #Unten:= Untere Intervallgrenze; Oben:= Obere Intervallgrenze; g:= zu integrierende Funktion;
  #G:= Gewicht; n:= Hinzuzufügende Knoten;
 
  Basenwechsel:=proc(Dividend, m);
 
  print(Anfang,Dividend,p[m]);
  Koeffizient:=quo(Dividend, p[m],x);
  print(Koeffizient);
  Rest:=rem(Dividend, p[m],x);
  print(Rest);
  if m=0 then
    Basenwechsel:=[Koeffizient];
  else
    
    Basenwechsel:=[Koeffizient,op(Basenwechsel(Rest,m-1))];
   print(Basenwechsel);
  end if;
  print(Durchlauf)
  end proc;
p[-1]:=0;
p[0]:=1;
for i from 1 to max(n,numelems(Liste)) do
  p[i]:=x^i-add(int(x^i*p[j]*diff(G,x),x=Unten..Oben)*p[j]/int(p[j]^2*diff(G,x),x=Unten..Oben),j=0..i-1);
  print(p[i]);
end do;
print(Liste[1],numelems(Liste));
Hn:=mul(x-Liste[i],i=1..numelems(Liste));
print(Hn);
 Koeffizienten:=Basenwechsel(Hn,numelems(Liste));
print(Koeffizienten)
end proc
 

Funnily enough, when I add a print command before the op-function, it does work:

 

NEUZMinus:= proc(Unten, Oben, f,G,Liste,n)::real;
  #Unten:= Untere Intervallgrenze; Oben:= Obere Intervallgrenze; g:= zu integrierende Funktion;
  #G:= Gewicht; n:= Hinzuzufügende Knoten;
 
  Basenwechsel:=proc(Dividend, m);
 
  print(Anfang,Dividend,p[m]);
  Koeffizient:=quo(Dividend, p[m],x);
  print(Koeffizient);
  Rest:=rem(Dividend, p[m],x);
  print(Rest);
  if m=0 then
    Basenwechsel:=[Koeffizient];
  else
    print(Basenwechsel(Rest,m-1));
    Basenwechsel:=[Koeffizient,op(Basenwechsel(Rest,m-1))];
   print(Basenwechsel);
  end if;
  print(Durchlauf)
  end proc;
p[-1]:=0;
p[0]:=1;
for i from 1 to max(n,numelems(Liste)) do
  p[i]:=x^i-add(int(x^i*p[j]*diff(G,x),x=Unten..Oben)*p[j]/int(p[j]^2*diff(G,x),x=Unten..Oben),j=0..i-1);
  print(p[i]);
end do;
print(Liste[1],numelems(Liste));
Hn:=mul(x-Liste[i],i=1..numelems(Liste));
print(Hn);
 Koeffizienten:=Basenwechsel(Hn,numelems(Liste));
print(Koeffizienten)
end proc

Does anyone know how I can get rid of the print command without getting no result? And how does a simple print command change the outcome of an algorithm in the first place?

 

Thank you in advance,

Daniel Reksten

 

Why are units disappearing in this expression?

The answer should be 0 kN, not 0.

Need help with write calculations in maple and ploting

Hello,

While working for an assignment I had to use a piecewise function which gives a result based on a randomly generated value. The following is a much simpler version of what I've been working on, but it gives the same error.

A random value is uniformly distributed between 0 and 100. The piecewise returns a 1 if the value is between 0 and 50 and it returns 2 if the value is between 50 and 100. As far as I understand this function should only ever give 1 or 2, never something else. However when I loop this a few times Maple regularly returns a 0, which doesn't make sense to me. I've printed the values that return a 0 but none of these should break the piecewise. Can someone please explain to me what's going wrong here and how to fix it?

My code:

restart; randir := piecewise(0 <= r1() and r1() < 50, 1, 50 <= r1() and r1() < 100, 2);
for i to 1000 do r1 := rand(0. .. 100.0); if randir = 0 then print(fail[i], r1()) end if end do;
 

I've included a failure check to see when and at what values it returns a 0, and as you can see it happens very often.

Hi there.

I noticed that in Maple 2020 default font size of document (Times New Roman 12) looking bigger than in previous versions. How can I make the view the same as in previous versions?

Thank you

The plot is not showing two lines perpendicular ?

First 423 424 425 426 427 428 429 Last Page 425 of 2097