Maple 2018 Questions and Posts

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

restart;
A002487 := proc (m) local a, b, n; option remember; a := 1; b := 0; n := m; while 0 < n do if type(n, odd) then b := a+b else a := a+b end if; n := floor((1/2)*n) end do; b end proc; listeinverse := proc (L::list) local i; [seq(op(nops(L)-i, L), i = 0 .. nops(L)-1)] end proc; Brocot := proc (n) local c, i, L, M, r; L := NULL; r := 2^n; L := [seq(A002487(i), i = 0 .. r)]; M := listeinverse(L); c[0] := 0, 1/cat(0); for i to r do c[i] := L[i]/M[i] end do; c[r+1] := 1/cat(0); return [seq(c[i], i = 1 .. r+1)], r+1 end proc; for i from 0 to 4 do B || i := Brocot(i) end do;
                              [   1]   
                        B0 := [0, -], 2
                              [   0]   
                             [      1]   
                       B1 := [0, 1, -], 3
                             [      0]   
                          [   1        1]   
                    B2 := [0, -, 1, 2, -], 5
                          [   2        0]   
                    [   1  1  2     3        1]   
              B3 := [0, -, -, -, 1, -, 2, 3, -], 9
                    [   3  2  3     2        0]   
       [   1  1  2  1  3  2  3     4  3  5     5        1]    
 B4 := [0, -, -, -, -, -, -, -, 1, -, -, -, 2, -, 3, 4, -], 17
       [   4  3  5  2  5  3  4     3  2  3     2        0]    
              rang := proc(M::list, a)  ...  end;;
                    /       1\ 
                rang|B2[1], -|;
                    \       2/ 
                / d        \        
                |--- don(x)| t work;
                \ dx       /        

F := proc (N) local a, b, L; L := NULL; L := sort([op({seq(seq(a/b, a = 0 .. b), b = 1 .. N)})]); return L, nops(L) end proc; F(1); F(2); F(3); F(4);
                           [0, 1], 2
                          [   1   ]   
                          [0, -, 1], 3
                          [   2   ]   
                       [   1  1  2   ]   
                       [0, -, -, -, 1], 5
                       [   3  2  3   ]   
                    [   1  1  1  2  3   ]   
                    [0, -, -, -, -, -, 1], 7
                    [   4  3  2  3  4   ]   
rang(F(3)[1], 2/3);
                        /[   1  1  2   ]  2\
                    rang|[0, -, -, -, 1], -|
                        \[   3  2  3   ]  3/

I want to compute a limit via maple and that it will show me the way how to compute the limit.

 

The limit is:

\lim_{epsilon ->0, t\in [0,1]} 1/(exp((-1+(1-4*epsilon)^(0.5))/(2*epsilon))-exp((-1-(1-4*epsilon)^(0.5))/(2*epsilon)))*[exp((-1+(1-4*epsilon)^(0.5))/(2*epsilon)*t)-exp((-1-(1-4*epsilon)^(0.5))/(2*epsilon)*t)]/(exp(1-t)-exp(1-t/(epsilon)))

 

According to my book it should converge to 1.

I tried manually but got stuck.

 

Hi there. Thank you all in advanced.

The general question is how to pass a pair of values to a list of functions that expect that pair of values as input.
I already know this solution for passing a list of values to a list of functions that expect one value as input.

map(eval~,[f(x),g(x)],x=~[p,q,t])

Well f(x) and g(x) take every element of the list, but what if f(x) and g(x) expect two values. The concrete case is to pass p and q to iquo and irem. The following were my tries:

  • map(eval~,[iquo(x),irem(x)],x=[p,q])
  • map(eval~,[iquo(x),irem(x)],x=(p,q))
  • map(eval~,[iquo(op(x)),irem(op(x))],x=[p,q])

I searched and found some partial related topics in the site but not quite with this approach.

 

how I can remove this error in dsolve?

Error, (in dsolve/numeric/bvp) singularity encountered
dsolv.mw

Given these functions identify their symmetries:

a) f(x)=4x^2-1/2

b)s(t)=t^3-4t

c) g(k)=-|2k-7|

d) x-y^2=3

e) h(a)=1/a-1

Dear Experts,

I am new user. I need your help!

I have numerical values of omega (w) and a2F(w) (500 rows). I need to do cumulative summation to get lambda(w) using   lambd=2 int (a2F(w)/w  dw). Please help me how can I do it?

Best Wishes,

Enamul Haque

How can I use Maple to solve a difference quotient problem? How do I enter the basic difference quotient formula and the quadratic equation to be used in the problem?

Hi,
I face a problem using Tolerances:-NominalValue and Tolerances:-ToleranceValue on a quantity constructed from add.

Example

restart:
with(Tolerances):
x := 10 &+-1:
y := 20 &+- 2:
z := 3*x+2*y;
NominalValue(z);     
# returns 70 as expected
ToleranceValue(z);   # returns 7 as expected


Now I define another quantity Z this way:

Z := add([3, 2] *~ [x, y]);
(or equivalently add(ListOfCoeffs[k]*ListOfVars[k], k=1..K) where ListOfCoeffs and ListOfVars are previously defined adhoc lists)

Both NominalValue(Z) and ToleranceValue(Z) return an error.
PS: already (and this probably explains that) Z does not appear as 70 +/- 7 but as 3*Interval(...)+2*Interval(...) (lprint confirmed)

How can I obtain NominalValue(Z) and ToleranceValue(Z) when Z comes from 'add' constructor?

         Fract := proc(P::posint, Q::posint)  
         local p,q:
         for p from 1 to P-1 do
            for q from 1 to Q-1 do
              if (P-p)*q-P*(Q-q)=1 the return (p/q,(P-p)/(Q-q): fi:
          od:od:  
       end;
        debug(Fract);
        Fract(5, 13);
        Fract(77, 200);

 

Is possible to solve this differential equation by maple?

thaks...

Hi,

I'm using the eBookTools package to convert a .mw file as a chapter into a PDF file. However, a problem arises when I convert a document with a few repeated plotting commands (such as plot(x^2)). The issue is that in the final PDF the images of the various plots overlap, and that the individual plots can't be clearly seen. Is there a resolution to this?

Thanks,
Bart

I'm trying to plot a graph of cos(2*theta)*omega*t+2*(sin(theta))^2*sin(omega*t)=0 in Maple (For values of theta between 40 and 88 degrees roughly, with a fixed value of omega). I have substituted x=omega*t and tried to solve, but as I'm sure you can tell it is not outputting the graph I'm after, I was hoping somebody would be able to tell me where I am going wrong. Thanks.

restart;
v := 145000;
thetavn := (1/6)*Pi;
omegac := .1;
s := cos(2*thetabn)*x+2*sin(thetabn)^2*sin(x);
plots:-implicitplot(s = 0, thetabn = 43*Pi*(1/180) .. 88*Pi*(1/180), x = -200 .. 200, tickmarks = ["piticks", "decimalticks"], gridrefine = 4, size = [800, 600]);

Is package SumTools supposed to be a superset of the sum command in Maple? Or is it supposed to be a complementary to it? When should one use SumTools vs. sum?

The help on SumTools says

The SumTools package contains commands that help find closed forms of definite and indefinite sums. The package consists of three commands and three subpackages.
 

But does not make it clear when to use it vs. sum or what is its relation to sum command.

I am asking because on one example, sum is able to give an answer, while SumTools can't. I have expected the other way, where if sum failed, then one will try SumTools.

restart;
sum(1/n*sin(n*x),n=1..infinity) assuming 0<x,x<Pi

SumTools:-IndefiniteSummation(1/n*sin(n*x),n=1..infinity) assuming 0<x, x<Pi

 

 

This should be simple but I am missing something. I want to sum the product of combinations of numbers.

I know I can assign values to a0...a[n-1]. But that isn't nice.

 

(n,k):= (5,4);
add(mul~(combinat:-choose([a(||)[](0..n-1)], k))) ; =a0*a1*a2*a3+a0*a1*a2*a4+a0*a1*a3*a4+a0*a2*a3*a4+a1*a2*a3*a4  which is correct.
add(mul~(combinat:-choose([(0..n-1)], k))) ;   #should be 24 but I get 0

 

Hello,

How I can remove this error.

also, i want to find answer via fsolve.

Error, (in fsolve) too many levels of recursion.

Thanks.

test.mw

First 10 11 12 13 14 15 16 Last Page 12 of 40