mmcdara

7891 Reputation

22 Badges

9 years, 54 days

MaplePrimes Activity


These are questions asked by mmcdara

Why do I get this wrong result when I try to solve formally this ode (note that acer has already obtained its implicit form here implicit)

restart:
interface(version)
Standard Worksheet Interface, Maple 2015.2, Mac OS X, December 21 2015 Build ID 1097895

edo := diff(y(x), x, x) = 1/y(x) - x*diff(y(x), x)/y(x)^2;
ic  := y(0)=1, D(y)(0)=0:

dsolve({edo, ic}, y(x));
eval(edo, %)
                                        / d      \
                                      x |--- y(x)|
               d  / d      \    1       \ dx     /
              --- |--- y(x)| = ---- - ------------
               dx \ dx     /   y(x)          2    
                                         y(x)     
                    
                            y(x) = 1

                             0 = 1


Thanks in advance

Not that I can't sleep quietly without it, but why is the possibility of receiving a vote or being selected as the best answer (ok, this rarely happens) no longer proposed in my replies?
For instance, in a recent reply (not the one I'm the prouder of) the header appears like this, witho ot thum nor star below "1 hour ago")


TIA

Hi, 
I wonder what is I in MAPLE?
Obviously I is not an indeterminate

z := a+I*b:
indets(z);

# but

has(z, I)
                             {a, b}
                              true

What does this answer mean:

whattype(I);
                   complex(extended_numeric)

I would have thought that  I was some kind of protected symbol such as Pi, but it's not

attributes(Pi);
attributes(I);
                           protected

In fact, trying to assign 1 to I just returns an error saying this is not legal assignment

I:=1
Error, illegal use of an object as a name

So, what is I in Maple?

Thanks in advance

Hi,

It seems that it's not possible to change the tickmarks on axis 2 of a sparsematrixplot.
Mire of this, trying to change them seems to suppress them...
Perhaps this was a problem in Maple 2015 which has since been corrected?
By any chance, would you have a trick to correct this?

TIA
 

restart:

interface(version)

`Standard Worksheet Interface, Maple 2015.2, Mac OS X, December 21 2015 Build ID 1097895`

(1)

M := LinearAlgebra:-RandomMatrix(20,density=0.25,generator=0 .. 1);

M := Vector(4, {(1) = ` 20 x 20 `*Matrix, (2) = `Data Type: `*anything, (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})

(2)

plots:-sparsematrixplot(
   M, matrixview
);

 

plots:-sparsematrixplot(
   M, matrixview
  ,axis[1]=[tickmarks=[seq(i=i-1, i in [seq](1..20, 5))]]
  ,axis[2]=[tickmarks=[seq(j=j-1, j in [seq](1..20, 5))]]
);

 

plots:-sparsematrixplot(
   M, matrixview
  ,axis[2]=[tickmarks=[seq(i=i-1, i in [seq](1..20, 5))]]
);

 

 


 

Download sparsematrixplot.mw

Hi, 

Working with Legendre Polynomials (LegendreP) I observed that solve doesn't find the correct number of zeros.
More precisely, for N > 17, solve(LegendreP(N, x)) finds less zeros than N.

I wrote a procedure based on a theorem about the intertwined location of the zeros of orthogonal polynomial of successive degrees. So this problem is not blocking, but I would like to understand while solve(LegendreP(N, x)) doesn't always do the job.

Thanks in advance.
 

restart:

Z := n -> op~(2, { allvalues(solve(LegendreP(n,x))) } );

proc (n) options operator, arrow; `~`[op](2, {allvalues(solve(LegendreP(n, x)))}) end proc

(1)

Digits:=10:
Z(17):
numelems(%);

17

(2)

Z(18):
numelems(%);

16

(3)

Digits:=15:
Z(18):
numelems(%);

16

(4)

Digits:=20:
Z(18):
numelems(%);

15

(5)

Zf := n -> op~(2, { allvalues(solve(evalf(LegendreP(n,x)))) } );
Z(18):
numelems(%);

proc (n) options operator, arrow; `~`[op](2, {allvalues(solve(evalf(LegendreP(n, x))))}) end proc

 

15

(6)

# Let z[N][i] the ith zero of any orthogonal polynomial P(N,x) of degree N.
#
# It is known that each open interval(z[N][i], z[N][i+1]) contains
# exactly a unique zero of the of P(N+1,x).

Z17 := [ -1, Z(17)[], 1]:
Z18 := NULL:
for n from 1 to 18 do
  Z18 := Z18, fsolve(LegendreP(18,x),  x=Z17[n]..Z17[n+1]);
end do:
numelems({Z18})

18

(7)

# A procedure to compute zeros of LegendreP up to degree N


zeros := proc(N)
  local zeros_table, Z, n, p, z:
  zeros_table := table([0=[]]):
  Z := [-1, 1]:
  for n from 1 to N do
    z := NULL:
    for p from 1 to n do
      z := z, fsolve(LegendreP(n,x),  x=Z[p]..Z[p+1]);
    end do;
    zeros_table[n] := [z]:
    Z := [-1, z, 1]
  end do;
  return zeros_table
end proc:


 

Download LegendreP_zeros.mw

First 25 26 27 28 29 30 31 Last Page 27 of 48