Maple 2018 Questions and Posts

These are Posts and Questions associated with the product, Maple 2018

Dear experts

I am interested to solve the following equation numerically by Maple. I would appreciate it if you let me how I can do and what the boundary conditions and initial values are needed


eq:= diff(2*diff(eta(x,y,t),t)+3*eta(x,y,t)*diff(eta(x,y,t),x)+(1/3-1/epsilon/B)*diff(eta(x,y,t),x,x,x),x)+diff(eta(x,y,t),y,y)-1/sqrt(Pi*R)*int(diff(eta(x+zeta,y,t),x,x)/sqrt(zeta),zeta=0..t/epsilon)=0;
where

1) epsilon, B and r are constant

2) 1/epsilon/B is not equal to 1/3 at all

how to show which region of the plan belongs to the argument points between 0 and Pi/2 and the module points between 0 and 2 ?

Can anyone please help me out with the following integration

 


                      f(x) = tanh(x)/sqrt(x^2+1)

 

limits x_initial =1, x_final =100

 

Thanks

 

I am trying to work through an example in a textbook, but its a few years old and uses maple 2015. I am currently using the 2018 edition of maple. The code is an example of how to generate the points on an elliptic curve given a specific input. 
Here is the example code from the textbook:

epoints := proc(ec, x, ub, p)
    local ecurve, z, pct, k, i;
    pct := 0;
    for k from 0 to p-1 while pct <= ub do
        z := subs(x=k, ec) mod p;
        if z = 0 then
           pct := pct+1;
           ecurve[pct] := [k,z];
        fi:
        if z &^ ((p-1)/2) mod p = 1 then
           z := z &^ ((p+1)/4) mod p;
           ecurve[pct+1] := [k,z];
           ecurve[pct+2] := [k, -z mod p];
           pct := pct+2;
        fi:
    od:
    if pct > ub then
       pct := ub:
    fi:
    seq(ecurve[i], i=1..pct):
end:


Here is my code, written to work with Maple 2018:

ecpoints := proc (ec, x, ub, p) local ecurve, z, pct, k, i;
      pct := 0; for k from 0 to p-1 while pct <= ub
         do z := `mod`(subs(x = k, ec), p);
         if z = 0 then pct := pct+1;
            ecurve[pct] := [k, z] end if;
         if `mod`(z^((1/2)*p-1/2), p) = 1 then
            z := `mod`(z^((1/4)*p+1/4), p) = 1;
           ecurve[pct+1] := [k, z];
           ecurve[pct+2] := [k, `mod`(-z, p)];
           pct := pct+2 end if
   end do;
   if ub < pct then pct := ub end if;


   seq(ecurve[i], i = 1 .. pct)
end proc

The problem is with the output. The output should be [0, 5], [0, 14], [2, 4], [2, 15], [3, 6], [3, 13], [4, 6], [4, 13], [6, 0], [10, 16], [10, 3], [12, 6], [12, 13], [14, 16], [14, 3], [18, 17], [18, 2].
What I get is [0, 5 = 1], [0, 14 = 18], [2, 4 = 1], [2, 15 = 18], [3, 6 = 1], [3, 13 = 18], [4, 6 = 1], [4, 13 = 18], [6, 0], [10, 16 = 1], [10, 3 = 18], [12, 6 = 1], [12, 13 = 18], [14, 16 = 1], [14, 3 = 18], [18, 17 = 1], [18, 2 = 18]. 
Any hints on what I could be doing wrong here or what is going on?

Dear All, 

 

I am trying to solve the following differential equation, which is a kind of Spherical Harmonics. Can anyone please help me out how to solve this?

((D@@2)(y))(r)+(D(y))(r)/r-sin(y(r))*cos(y(r))/r^2+sin(y(r))^2/r-sin(y(r))-sin(2*y(r)) = 0

 

Thanks 

Dear all

I use Maple 2018 and have following problem:

 

I define following procedure and want to plot it. However Maple displays the coordinate system but does not plot anything nor gives and error message. Hope you can help.

 

Thanks

Murad

b:=proc(n)
local b,i:
 for i from 0 to n do
  if i=0 then
   b[0]:=0:
  elif i=1 then
   b[1]:=1:
  else
   b[i]:=(b[i-1]+b[i-2])/2:
  end if:
 end do:

return b[n]

end proc:

 

plot(b,0..10)

 

Maple 2018  has recently has  become sluggish to start up  -and very slow to respond to input. Can anyone suggest remedies?  I have plenty of space and CPU. Other apps seem to start fine.  Can any suggest a diagnosis and/or solution?

Melvin

Good day.

Reading through the Fuzzy C-Means routine (attached) written by the one-and-only Carl Love, I was wondering if anybody can tell me how to specify which points in the data belong most strongly to the assigned cluster. 

In the attached routine, there are 2 cases considered; two and three clusters. 

It would be interesting to obtain a list of all points that are assigned to each respective cluster.

Thanks for reading!

Fuzzy_clusters.mw

 
Hi !
 
I have been working for a long time to evaluate several infinites summations .
I often use a command like  "simplify(combine(sum1-sum2))"  to check if both summations are equal .
Now ,I found that the "simplify" command is not reliable at all . Check my file "simplify.mw" .
 
I have Maple 2017 and 2018 on Windows 10 .
I'm angry because I have to double check all of my work trying not to use this buggy command.
If someone can confirm that the 2020 version of Maple has an improved "simplify" command , I will buy it immediately.
 
Thank you !
Rejean

Any integer in [129,129+13^2[ 1s written as the sum of squares of separate integers equal to or less than 12.
examples:: 129=10^2+5^2+2^2, 130=11^2+3^2... 132=9^2+5^2+4^2+3^2+1^2...
179=12^2+5^2+3^2+1^2...297=12^2+10^2+7^2+2^2. Thank you.

Dear sir, I request to suggest the method for the following posted question.

 

How to find a rational function with give real roots 1,2,3  and oblique asymptote y=2-x?

Hi everyone,

In the RandomTools package, the Generate(integer(range = A..B)) function generates a random integer in the range A..B. All integers in that range have the same probability to be generated, that is, 1/nops([seq(A..B)]). However, I would like to specify the probabilities of each integer. How to do so?

Example: range = 1..5. Instead of P(X=j)=1/5 with j =1,2,3,4,5, let's say the probabilities should be as follows:

P(X=1) = 0.2, P(X=2) = 0.5, P(X=3) = P(X=4) = P(X=5) = 0.1

How to generate a random integer between 1 and 5 with these probabilities?

Thank you in advance.

Hello Guys and Girls,

I have a problem with animate command with background option..

I attached my maple worksheet for your review.

Could you help me out?  Thanks.

I love Maple,

Sincerely

Ali Guzel

I'm trying show the all roots of equations using Bairstow's methodt, but only shows the roots of Quadratic Factor and don't show the others roots of the other equation. Thanks

This the code:


 

restart; Bairstow := proc (n, a, u0, v0, itmax, TOL) local u, v, b, c, j, k, DetJ, du, dv, s1, s2; u := u0; v := v0; b := Array(0 .. n); c := Array(0 .. n); b[n] := a[n]; c[n] := 0; c[n-1] := a[n]; for j to itmax do b[n-1] := a[n-1]+u*b[n]; for k from n-2 by -1 to 0 do b[k] := a[k]+u*b[k+1]+v*b[k+2]; c[k] := b[k+1]+u*c[k+1]+v*c[k+2] end do; DetJ := c[0]*c[2]+(-1)*c[1]*c[1]; du := (-b[0]*c[2]+b[1]*c[1])/DetJ; dv := (b[0]*c[1]-b[1]*c[0])/DetJ; u := u+du; v := v+dv; printf("%3d %12.7f %12.7f %12.4g %12.4g\n", j, u, v, du, dv); if max(abs(du), abs(dv)) < TOL then break end if end do; printf("\nQ(x)=(%g)x^%d", b[n], n-2); for k from n-3 by -1 to 1 do printf(" + (%g)x^%d", b[k+2], k) end do; printf(" + (%g)\n", b[2]); printf("Remainder: %g(x-(%g))+(%g)\n", b[1], u, b[0]); printf("Quadratic Factor: x^2-(%g)x-(%g)\n", u, v); s1 := evalf((1/2)*u+(1/2)*sqrt(u*u+4*v)); if u^2+4*v < 0 then printf("Zeros: %.13g +-(%.13g)i\n", Re(s1), abs(Im(s1))) else s2 := evalf((1/2)*u-(1/2)*sqrt(u*u+4*v)); printf("Zeros: %.13g, %.13g\n", s1, s2) end if end proc; P := proc (x) options operator, arrow; x^5+(-1)*3.5*x^4+2.75*x^3+2.125*x^2+(-1)*3.875*x+1.25 end proc; n := degree(P(x)); a := Array(0 .. n); a[0] := P(0); for i to n do a[i] := coeff(P(x), x^i) end do; itmax := 10; TOL := 10^(-10); r := -1; s := -1; Bairstow(n, a, r, s, itmax, TOL)

  1   -0.6441699    0.1381090       0.3558        1.138
  2   -0.5111131    0.4697336       0.1331       0.3316
  3   -0.4996865    0.5002023      0.01143      0.03047
  4   -0.5000001    0.5000000   -0.0003136   -0.0002023
  5   -0.5000000    0.5000000    6.413e-08    9.268e-09
  6   -0.5000000    0.5000000            0            0

Q(x)=(1)x^3 + (-4)x^2 + (5.25)x^1 + (-2.5)
Remainder: 0(x-(-0.5))+(0)
Quadratic Factor: x^2-(-0.5)x-(0.5)
Zeros: 0.4999999993, -0.9999999997

 

 

Only show two roots: 0.4999999993, -0.9999999997, but the other roots are missing: 2, -1, 1+0.5i, 1-0.5i approximately, any solution?

I think it's in this part, but I can't think of how to implement it to get the missing roots.

 

Download Bairstow.mw

 

First 15 16 17 18 19 20 21 Last Page 17 of 62