Maple Questions and Posts

These are Posts and Questions associated with the product, Maple


How to force Maple to prove equality (2) under conditions cond.

 

restart:

# Given
#     0 < u < 1
#     0 < v < 1
#     theta > 1
#
# let F the function defined by:

F := (u, v) -> exp(-((-ln(u))^theta+(-ln(v))^theta)^(1/theta))

proc (u, v) options operator, arrow; exp(-((-ln(u))^theta+(-ln(v))^theta)^(1/theta)) end proc

(1)

# How to prove this equality for any n > 0?

'F(u^(1/n), v^(1/n))^n' = 'F(u, v)'

F(u^(1/n), v^(1/n))^n = F(u, v)

(2)

cond := u > 0, u < 1, v > 0, v < 1, theta > 1, n > 1:

simplify(F(u^(1/n), v^(1/n))^n - F(u, v)) assuming cond;

(exp(-(((-ln(u))^theta+(-ln(v))^theta)*n^(-theta))^(1/theta)))^n-exp(-((-ln(u))^theta+(-ln(v))^theta)^(1/theta))

(3)

 

 

Download Stable.mw


Thanks for your help.

Hi, I am using ArchLinux and used Maple's official installer to install it. Whenever I export my Maple files as PDF all my "-" symbols are converted to "K" for some reason. Has anyone else had this issue or have an idea on how to fix it?

Below is a screenshot of what I mean. "-" has been replaced with "K"

Hi! Do you know how can I plot revolution of this curve:

plot(1 + 1/4*sin(8*(1 + 1/8*sin(16*(1 + 1/16*sin(32*t))))), t = 0 .. 2*Pi, coords = polar)

to get a wrinkled torus like this:

Abelprijs 2015 voor John Nash en Louis Nirenberg - NEMO Kennislink

Do u have any idea? (I've tried to convert this polar curve to cartesian coords but I don't get it)

Hello

I have a list with n positive integer numbers and a positive integer k.

I would like to write a Malple programm, that calculates, in how many ways k can be written as a sum of numbers in the list.

Easy examles: let the list be [2,3,6,9].

k=9 can be written in 4 ways: 9=9, 9=6+3, 9=3+3+3, 9=3+2+2+2. The result therefore shoud be 4.

k=8 can be written in 3 ways: 8=6+2, 8=3+3+2, 8=2+2+2+2. The result therefore shoud be 3.

Thank you very much your help!

Hi everyone,

I am using Maple for quite a while, now I would like to do something new.

I am a teacher at a german highschool and I would like to generate class tests with maple. Say for an example, I need 30 tests,  where the first task is calculating the first derivative of a function. This function should be different for every person, for example f(x)=a*x^3+3x^2, where the value of a is different in every test (probably random).

So what I need is a way to generate nice looking sheets in Maple (including page breaks, titles and so on). Is there a way to generate such a thing in maple or do I have to export to TeX and adjust there quite a bit?

Maybe someone has done a similar thing. Actually I am looking for something like serial letters in Maple.

Any idea, how I could do such a thing?

Thanx for your help,

Axel

GraphTheory:-GraphEqual says that G1 and G2 are equal, but GraphTheory:-AllPairsDistance gives different results instead: 

restart;

with(GraphTheory)

M := `<|>`(`<,>`(0, 0, 0), `<,>`(1, 0, 0), `<,>`(1, 1, 0))

G__1 := Graph(convert(-M, Matrix, datatype = integer[8]))

G__2 := Graph(convert(-M, Matrix, datatype = integer))

GraphEqual(G__1, G__2)

true

(1)

AllPairsDistance(G__1)

AllPairsDistance(G__2)

Matrix(%id = 36893491227039185244)

 

Error, (in GraphTheory:-AllPairsDistanceExt) negative cycle detected

 

 

Download allpairs.mw

So, which one is incorrect? Any reasons?

restart

with(PolynomialIdeals):

``

``

randomzero := proc (ListVar) local A, G, i, lm, B, f, g; option trace; A := ListVar; G := NULL; for i to nops(A) do f := A[i]^(i+1)+randpoly([op(`minus`({op(A)}, {A[i]}))], terms = 1, coeffs = rand(-4 .. -1), degree = i); G := G, f end do; print(IsZeroDimensional(`<,>`(G))); RETURN([G]) end proc:

randomzero([x, y])

{--> enter randomzero, args = [x, y]

 

[x, y]

 

"G:="

 

x^2-y-4

 

x^2-y-4

 

y^3-3*x

 

x^2-y-4, y^3-3*x

 

true

 

<-- exit randomzero (now at top level) = [x^2-y-4, y^3-3*x]}

 

[x^2-y-4, y^3-3*x]

(1)

``

Download bug.mw

Hi

I think there is a bug in the "randpoly" command. please see the attached file line 7 of my procedure "randomzero". Why x^2-y-4 is created while terms=1 is considered and the outputs must contain binomial?

Hi
It's been years since expressions like A %* B %+ C involving inert arithmetic operators used in infix form are correctly understood (parsed) when written on a 1D-Math input line. The idea is simple: have the operators %. %*, %+, %-, %^, %/ work on input as infix operators the same way their active forms: ., *, +, -, ^, / do. This useful functionality, however, remained elusive when using 2D-Math input notation, so one would have to resort to using the functional form of the operators. E.g., input the above as `%+`(`%*`(A, B) ,C), which for me is really ugly. Besides being a bit demoralizing: we do all this fuzz about how great computer algebra and 2D-Math input notation is, and then input things in that way …

So this is to mention that this elusive functionality of inert arithmetic operators used in infix form within a 2D-Math input line now works. The novelty is present in the latest Maplesoft Physics Updates for Maple 2023, which is version 1490. As usual, to install the Updates open a Maple worksheet and input Physics:-Version(latest).

Here is an image (worksheet at the end) showing the new thing


The implementation is pretty new; reports of anything related to these inert operators not displayed/working as you'd expect are much appreciated. 


Download Inert_arithmetic_operators_in_2D_Math.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Some work, while others don't work. 
 

restart;

`assuming`([is(1/(sqrt(n*(n+1))*(sqrt(n)+sqrt(n+1))) = 1/sqrt(n)-1/sqrt(n+1))], [n::posint])

true

(1)

sum(1/sqrt(n)-1/sqrt(n+1), n = 1 .. infinity)

1

(2)

sum(1/(sqrt(n*(n+1))*(sqrt(n)+sqrt(n+1))), n = 1 .. infinity)

sum(1/((n*(n+1))^(1/2)*(n^(1/2)+(n+1)^(1/2))), n = 1 .. infinity)

(3)

`assuming`([sum(binomial(3*n, n)*x^n/(2*n+1), n = 0 .. infinity)], [abs(x) <= 4/27])

(2/3)*3^(1/2)*sin((1/3)*arcsin((3/2)*3^(1/2)*x^(1/2)))/x^(1/2)

(4)

`assuming`([eval(binomial(3*n, n)*x^n/(2*n+1), n = 0)+sum(binomial(3*n, n)*x^n/(2*n+1), n = 1 .. infinity, parametric)], [abs(x) <= 4/27])

1+x*hypergeom([1, 4/3, 5/3], [2, 5/2], (27/4)*x)

(5)

simplify(convert(1+x*hypergeom([1, 4/3, 5/3], [2, 5/2], (27/4)*x)-hypergeom([1/3, 2/3], [3/2], (27/4)*x), elementary), symbolic)

(1/3)*(3*x^(1/2)+3*x^(3/2)*hypergeom([1, 4/3, 5/3], [2, 5/2], (27/4)*x)-2*3^(1/2)*sin((1/3)*arcsin((3/2)*3^(1/2)*x^(1/2))))/x^(1/2)

(6)

plot((1/3)*(3*x^(1/2)+3*x^(3/2)*hypergeom([1, 4/3, 5/3], [2, 5/2], (27/4)*x)-2*3^(1/2)*sin((1/3)*arcsin((3/2)*3^(1/2)*x^(1/2))))/x^(1/2), x = -4/27 .. 4/27)

 

verify(0, (1/3)*(3*x^(1/2)+3*x^(3/2)*hypergeom([1, 4/3, 5/3], [2, 5/2], (27/4)*x)-2*3^(1/2)*sin((1/3)*arcsin((3/2)*3^(1/2)*x^(1/2))))/x^(1/2), 'equal')

FAIL

(7)

NULL


 

Download unable_to_sum.mw

How to explain this behavior?
I have read the help page, but I can not get the point.

Please, is there anyway I can solve this problem with a nice output? The solution I got is complicated. Please, helper is need

f := exp(-beta*x)*x^(5-alpha)

int(f, x)

beta^(alpha-6)*(-x^(-alpha)*beta^(-alpha)*(alpha^4-14*alpha^3+71*alpha^2-154*alpha+120)*(alpha-6)*(beta*x)^((1/2)*alpha)*exp(-(1/2)*beta*x)*WhittakerM(-(1/2)*alpha, -(1/2)*alpha+1/2, beta*x)/(-alpha+6)+x^(-alpha)*beta^(-alpha)*(beta^4*x^4-alpha*beta^3*x^3+alpha^2*beta^2*x^2+5*beta^3*x^3-alpha^3*beta*x-9*alpha*beta^2*x^2+alpha^4+12*alpha^2*beta*x+20*beta^2*x^2-14*alpha^3-47*alpha*beta*x+71*alpha^2+60*beta*x-154*alpha+120)*(alpha-6)*(beta*x)^((1/2)*alpha)*exp(-(1/2)*beta*x)*WhittakerM(-(1/2)*alpha+1, -(1/2)*alpha+1/2, beta*x)/(-alpha+6))

How to write a program that obtains the value of the function by giving different values
Like the example below:

 

I rephrased my previous question in a more synthetic form
(there was probably a lot in it that I thought was important for understanding the problem, but I realized afterwards that it only added confusion).

The true question is yellow-highlighted in the code below

restart

# The result below seems natural: we were taught in school that exp 
# being a bijective function we can get rid of it in the equality to
# solve and write simply x=Pi.

x = solve(exp(x)=exp(Pi), x)

x = Pi

(1)

# But the solution method solve uses is not that natural (and I
# don't really understand it).
# infolevel[solve] := 10:
# x = solve(exp(x)=exp(Pi), x);

# Replacing now exp by some undefined function f produces a
# kind of "no-solution" answer: this seems quite normal because
# not knowing the properties of f one cannot simply get rid of it.

infolevel[solve] := 0:
x = solve(f(x)=f(Pi), x)

x = RootOf(f(_Z)-f(Pi))

(2)

# Finally replace f by a bijective function with no analytic expression.

s = solve(erf(x)=erf(Pi), x) assuming x::real

s = RootOf(erf(_Z)-erf(Pi))

(3)

# It would have seem reasonable for Maple to answer x=Pi, or
# at least it is what I would have done given the properties
# of the erf function.
#
# How can I "force" Maple to "simplify" it's RootOf result to get
# x=Pi?


Download solve_erf.mw

For those interested in the motivations of this quastion, see here Where_does_the_question_come_from.mw

The original question is here Original_question.pdf

How is the expansion of trigonometric functions in Maple like the following function?

that in Kip Thorne's book Maple is mentioned through out ?

Kip Thorne and Roger Blandford : "Modern Classical Physics: Optics, Fluids, Plasmas, Elasticity, Relativity, and Statistical Physics"

also, courtesy of Caltech in Chapter 24

restart;
alias(u = u(x, z, t), f = f(x, z, t));
                              u, f
u := (f+sqrt(R))*exp(I*R*x);
                    /     (1/2)\           
                    \f + R     / exp(I R x)
pde1 := I*(diff(u, z))+diff(u, x, x)+diff(u, t, t)+u*abs(u)*abs(u)-(u*abs(u)*abs(u))*abs(u)*abs(u);
    / d   \              / d  / d   \\           
  I |--- f| exp(I R x) + |--- |--- f|| exp(I R x)
    \ dz  /              \ dx \ dx  //           

           / d   \                /     (1/2)\  2           
     + 2 I |--- f| R exp(I R x) - \f + R     / R  exp(I R x)
           \ dx  /                                          

       / d  / d   \\           
     + |--- |--- f|| exp(I R x)
       \ dt \ dt  //           

                                                            2
       /     (1/2)\                           2 |     (1/2)| 
     + \f + R     / exp(I R x) (exp(-Im(R x)))  |f + R     | 

                                                            4
       /     (1/2)\                           4 |     (1/2)| 
     - \f + R     / exp(I R x) (exp(-Im(R x)))  |f + R     | 

simplify(%);
         / d   \              / d  / d   \\           
       I |--- f| exp(I R x) + |--- |--- f|| exp(I R x)
         \ dz  /              \ dx \ dx  //           

                / d   \                 2             
          + 2 I |--- f| R exp(I R x) - R  exp(I R x) f
                \ dx  /                               

             (5/2)              / d  / d   \\           
          - R      exp(I R x) + |--- |--- f|| exp(I R x)
                                \ dt \ dt  //           

                                               2  
                                   |     (1/2)|   
          + exp(I R x - 2 Im(R x)) |f + R     |  f

                                               2       
                                   |     (1/2)|   (1/2)
          + exp(I R x - 2 Im(R x)) |f + R     |  R     

                                               4  
                                   |     (1/2)|   
          - exp(I R x - 4 Im(R x)) |f + R     |  f

                                               4       
                                   |     (1/2)|   (1/2)
          - exp(I R x - 4 Im(R x)) |f + R     |  R     
collect(%, exp(I*R*x));
  /  (5/2)       / d   \      2       / d   \   / d  / d   \\
  |-R      + 2 I |--- f| R - R  f + I |--- f| + |--- |--- f||
  \              \ dx  /              \ dz  /   \ dx \ dx  //

       / d  / d   \\\           
     + |--- |--- f||| exp(I R x)
       \ dt \ dt  ///           

                                          2  
                              |     (1/2)|   
     + exp(I R x - 2 Im(R x)) |f + R     |  f

                                          2       
                              |     (1/2)|   (1/2)
     + exp(I R x - 2 Im(R x)) |f + R     |  R     

                                          4  
                              |     (1/2)|   
     - exp(I R x - 4 Im(R x)) |f + R     |  f

                                          4       
                              |     (1/2)|   (1/2)
     - exp(I R x - 4 Im(R x)) |f + R     |  R     
 

First 181 182 183 184 185 186 187 Last Page 183 of 2217