Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

1. The general case (the first output) is fine, but the second output is wrong. Surprisingly, replacing series(ee, ...) with series(sqrt(1/x)*erf(sqrt(x)), ...) does something different:

ee := sqrt(1/x)*erf(sqrt(x));

series(ee, x = 0, 2);
% assuming x < 0;
             -2/sqrt(Pi)+2*x/(3*sqrt(Pi))+O(x^2)

series(ee, x = 0, 2) assuming x < 0; # wrong
              2/sqrt(Pi)-2*x/(3*sqrt(Pi))+O(x^2)

series(sqrt(1/x)*erf(sqrt(x)), x = 0, 2) assuming x < 0;
Error, (in assuming) when calling '`series/signum`'. Received: 'no series at 0'

2. Should Maple be able to handle nested discontinuities? The constant term here is incorrect, so the remainder is not O(z^2).

series(ln(I*ln(-1+z)), z = 0, 2);
         ln(Pi)-(1/2*I)*csgn(ln(-1+z))*(csgn(I*(-1+z))+1)*Pi-I*csgn(I*(-1+z))*z/Pi+O(z^2)

3. This is wrong (it would mean that I^z is unbounded for large positive z):

series(a^z, z = infinity, 2);
                exp((1/2*I)*z*(1-signum(a))*Pi)*abs(a)^z

 

I have a series with an integral inside the series.  I have worked the problem 2 different ways using sum vs Sum.  The integration variables are independent of the series variables so swapping the order of operation should not matter, but in the case, (S2), I do get a difference & I do not understand why.  The explanation fo INERT vs ACTIVE I do not think explains this.  The reason why I say this is because S1 the ACTIVE sum concurs with the INERT expressions S3 & S4.  S2 is swapping the order of operation for the ACTIVE sum does not yield the same result as the other 3 cases.  Why is this?  I am at a loss so including examples would be helpful to me.

swapping_orders_of_operation.mw

I'm writing this procedure to calculate a Julian date:

JD := proc (YY, MM, DD)

local A, B, z;

if MM = 1 or MM = 2 then

YY := YY-1; MM := MM+12

end if;

A := floor((1/100)*YY);

B := 2-A+floor((1/4)*A);

z := evalf(floor(365.25*YY)+floor(30.6001*(MM+1))+DD+1720994.5) end proc;

If I type:

JD(2018, 1, 11);  I get
Error, (in JD) illegal use of a formal parameter.

I cannot see where the illegal use is or why I get this message. I don't think I use anything out of the ordinary.

Could you help me please?

 

Thank you

 

Hi all!
I'm totally new using Maple (just installed right now) and need to solve this ODE using Runge-Kutta 4th order scheme. I found there's an inbuilt function for it but I just don't know how to use it.

Can anyone please help me out with this? I'm a bit in a rush and don't have too much time for trial and errors approach.

Much appreciate any help.

Hi

Sometimes when I'm solving an equation I get the result in the form of a constant multiplied by zero, instead of just the number 0.

Is it possible to remove that option so I won't get a confusing answer? I've attached a picture of an example here

Thanks!

2.mw
 

416*(1-tanh(rho*y)^2)^2*tanh(rho*y)^3-272*(1-tanh(rho*y)^2)^3*tanh(rho*y)-32*tanh(rho*y)^5*(1-tanh(rho*y)^2)

416*(1-tanh(rho*y)^2)^2*tanh(rho*y)^3-272*(1-tanh(rho*y)^2)^3*tanh(rho*y)-32*tanh(rho*y)^5*(1-tanh(rho*y)^2)

(1)

``


 

Download 2.mw
 

416*(1-tanh(rho*y)^2)^2*tanh(rho*y)^3-272*(1-tanh(rho*y)^2)^3*tanh(rho*y)-32*tanh(rho*y)^5*(1-tanh(rho*y)^2)

416*(1-tanh(rho*y)^2)^2*tanh(rho*y)^3-272*(1-tanh(rho*y)^2)^3*tanh(rho*y)-32*tanh(rho*y)^5*(1-tanh(rho*y)^2)

(1)

``


 

Download 2.mw
 

416*(1-tanh(rho*y)^2)^2*tanh(rho*y)^3-272*(1-tanh(rho*y)^2)^3*tanh(rho*y)-32*tanh(rho*y)^5*(1-tanh(rho*y)^2)

416*(1-tanh(rho*y)^2)^2*tanh(rho*y)^3-272*(1-tanh(rho*y)^2)^3*tanh(rho*y)-32*tanh(rho*y)^5*(1-tanh(rho*y)^2)

(1)

``

 How can I collect these  for  simplest form 

 

 

 

Hi,

I would like to ask a very basic question. The solution would indeed simplify my life!

I have a function called (eu) :

eu := -2*n^2*B^2+2*n*B^2*p-2*n*B^2*p^2+n*B^2-B^2*p+B^2*p^3+n*c*d

I would like to collect it with respect to two specific terms: (n-p+p^2) and (n-p+p^3), that would give me at the end:

eu := -2*n*B^2*(n-p+p^2)+B^2*(n-p+p^3)+n*c*d

Collect command gives me the following error meesage: "Error, (in collect) cannot collect n-p+p^2".

Would you have a solution for this problem?

Thanks in advance.

Basak

The program below is meant to use the  solve command to find the sides a, b, c of a triangle, given the lengths of the three altitudes, hA, hB and hC.  This program came from a higher version of Maple and I wondered what the word 'explicit' is meant to do in the  Sol->[solve({hA=(...statement.  The output just gives the name Sol - when I would have liked it to either give a solution for the sides in terms of the altitudes hA,hB,hC - or numeric float values.  For the attempted values of the altitudes all being equal to sqrt(30/2, the triangle is equilateral of side 1.

  Any suggestions to get this to work in Maple 7would be most appreciated.

Thanks,

   David

 

 

> restart:

# # # # # # # # # # # # # # # # # # # # # # # # # # # #

# Altitude exploration 

# Trying to obtain expressions for the sides a,b,c of a triangle
# given the altitudes.

# # # # # # # # # # # # # # # # # # # # # # # # # # # # #

#with(plots):

#with(plottools):

#with(geometry):

Sol->[solve({hA=(a+b+c)/a, hB=(a+b+c)/b, hC=(a+b+c)/c},{a,b,c}  )];  #,explicit)];

#  ???Is explicit needed?? Is it a Maple 7 feature?

 

abc:=simplify(eval(Sol,[hA=sqrt(3)/2,hB=sqrt(3)/2, hC=sqrt(3)/2]));  #should give a=b=c=1

gf:=eval(Sol, a=1);

 

Warning, the name changecoords has been redefined

 

Hi Dears,

I know "randpoly" command of Maple and I need to generate some random polynomials with parametric coefficients. For this I used this command for input set {a,b,c,d,x,y,z,w} which {a,b,c,d} are parameters and {x,y,z,w} are variables. But, the generated polynomials were not interestting. For example, some polynomials such as $(a-b)xy+(c^2-a)x*y*z-a*b+(d-1)z^2w$ are interested for me. In fact, difference parametric coefficients is important. 

Could you please help me to generate them?

Sincerely yours 

I am interested in the 5 circle theorem of Miquel.  Search on the internet 'Miquel five circle theorem' for more details. I would like to prove this theorem using Maple, and also see if there is a generalisation to this for more than 5 circles.  I wish to find the points of intersection of the circles and am using the fsolve command:

fsolve({(x-x[i])^2+(y-y[i])^2-r[i]^2, (x-x[i-1])^2+(y-y[i-1])^2-r[i-1]^2}, {x, y});

I am using the curly braces for sets - as I can't seem to get it to work for [] lists.   The output gives something like {x=12.0005, y=4.65}.  I want to use these values to obtain straight line equations and verify that the lines formed by successive circles form a pentagram, with all vertices on the five circles.  I just want to get to the floating point values, without the x= part.  The type of the returned expressions is '=' - whatever that means!

    I'm also wondering if using the plottools and plots packages is sufficient - as opposed to the geometry pakage.

I'm interested in how many people have heard of this theorem.  Does it have any generalisations to 6, 7, ... circles?

Any help or comments gratefully received.

    David.   

Hellow dears!!!

Hope everyone is fine with everything. I want the animation of the numerical solution of ODE i,e., f4 for delta=[0,1.5]. Please see the attachment and fix my problem. I Shall be very thankful to you.

Graph.mw

Special request to  acer 13834@Carl Love ,Preben Alsholm 10271

As part of the class I am teaching in biofluid mechanics, the students are learning about the Buckingham Pi theory for finding dimensionless groups (pi-groups).  The process involves the dimensions of parameters in terms of their basic units of measure: mass, M, length, L, and time, T.  Fore example, fluid density is M/L3 .  A typical step is to represent a product of parameters in terms of these measures raised to exponents.  Here is an example

(M/LT)a(M/L3)b(L2)c

where the exponents a,b,c are to be determined. What command(s) will massage this form to look like

Ma+b  L2c-3b-a T-a  ?

Cheers

 

Greetings to all.

A basic Euler-MacLaurin Summation recently appeared at this Math.Stackexchange Link . Several users computed an asymptotic expansion for the sum given by sum(1/k^sigma, k=1..n) with sigma a parameter between zero and one. E.g. for sigma=1/3 we find

       2/3
    3 n                     1           1           7            13            247
    ------ + Zeta(1/3) + -------- - --------- + ---------- - ----------- + ------------
      2                     (1/3)       (4/3)         10/3          16/3           22/3
                         2 n        36 n        4860 n       26244 n       590490 n

Comparing this with Euler-Maclaurin Maple produces the following:

> eulermac(1/n^(1/3), n, 8);
       2/3
    3 n         1           1           7            13            247             1
    ------ - -------- - --------- + ---------- - ----------- + ------------ + O(-------)
      2         (1/3)       (4/3)         10/3          16/3           22/3      (28/3)
             2 n        36 n        4860 n       26244 n       590490 n         n

The sign on the second term is incorrect. I would be curious to know what is happening here. BTW Mathematica also yields a plus sign on this term, same as what was obtained at the link.

Thank you for any comments you may have.

Marko Riedel

My September 9, 2016, blog post ("Next Number" Puzzles) pointed out the meaninglessness of the typical "next-number" puzzle. It did this by showing that two such puzzles in the STICKELERS column by Terry Stickels had more than one solution. In addition to the solution proposed in the column, another was found in a polynomial that interpolated the given members of the sequence. Of course, the very nature of the question "What is the next number?" is absurd because the next number could be anything. At best, such puzzles should require finding a pattern for the given sequence, admitting that there need not be a unique pattern.

The STICKELERS column continued to publish additional "next-number" puzzles, now no longer of interest. However, the remarkable puzzle of December 30, 2017, caused me to pull from the debris on my retirement desk the puzzle of July 15, 2017, a puzzle I had relegated to the accumulating dust thereon.

The members of the given sequence appear across the top of the following table that reproduces the graphic used to provide the solution.

It turns out that the pattern in the graphic can be expressed as 100 – (-1)k k(k+1)/2, k=0,…, a pattern Maple helped find. By the techniques in my earlier blog, an alternate pattern is expressed by the polynomial

which interpolates the nodes (1, 100), (2, 101) ... so that f(8) = -992.

The most recent puzzle consists of the sequence members 0, 1, 8, 11, 69, 88; the next number is given as 96 because these are strobogrammatic numbers, numbers that read the same upside down. Wow! A sequence with apparently no mathematical structure! Is the pattern unique? Well, it yields to the polynomial

which can also be expressed as

Hence, g(x) is an integer for any nonnegative integer x, and g(6) = -401, definitely not a strobogrammatic number. However, I do have a faint recollection that one of Terry's "next-number" puzzles had a pattern that did not yield to interpolation. Unfortunately, the dust on my desk has not yielded it up.
 

First 862 863 864 865 866 867 868 Last Page 864 of 2216