C_R

3862 Reputation

21 Badges

6 years, 283 days

MaplePrimes Activity


These are questions asked by C_R

In 2-D Math input:
In a product of more than two factors space is not allways sufficient to delimite factors when one of the factors is of type numeric.

Just for my interest: Is there a reason or a rule for that?

2-D Math: space interpreted as multiplication

a*b*c

a*b*c

(1)

2*b*c

2*b*c

(2)

With numbers this does not work in these cases

"a 2 c"

Error, missing operation

"a 2 c"

 

"a b 2"

Error, missing operation

"a b 2"

 

Multiplication operators are required

"2 2 c"

 

2*a*c

2*a*c

(3)

2*a*b

2*a*b

(4)

NULL

Download Missing_operation.mw

Has anybody seen something like that? I do not use Maple 2026 very often.

Does this vanish when the document is executed on another machine?

 

repeated_equation_labels.mw

Update:

  • expanding the document block by "show command" makes the equation labels disappear.
  • copying the input to another document block seems to fix the problem

This is a follow-up question from here concerned with rearraging (not simplifying) an expression for an easier visual comparision.

restart

In a Maple document I want to demonstrate (easier to follow from the output without the knowledge of Maple commands) that the following expression

expr := sqrt(2)/(sqrt(-beta^2+1)*sqrt(2+(-x-1)*beta^2))

2^(1/2)/((-beta^2+1)^(1/2)*(2+(-x-1)*beta^2)^(1/2))

(1)

can visually match the integrand of this ellpitic integral

FunctionAdvisor(definition, EllipticF)

[EllipticF(z, k) = Int(1/((-_alpha1^2+1)^(1/2)*(-_alpha1^2*k^2+1)^(1/2)), _alpha1 = 0 .. z), MathematicalFunctions:-`with no restrictions on `(z, k)]

(2)

This can be done with following substitution

x = 2*k^2-1

x = 2*k^2-1

(3)

subs(x = 2*k^2-1, 2^(1/2)/((-beta^2+1)^(1/2)*(2+(-x-1)*beta^2)^(1/2)))

2^(1/2)/((-beta^2+1)^(1/2)*(-2*beta^2*k^2+2)^(1/2))

(4)

simplify(2^(1/2)/((-beta^2+1)^(1/2)*(-2*beta^2*k^2+2)^(1/2)))

1/((-beta^2+1)^(1/2)*(-beta^2*k^2+1)^(1/2))

(5)

Since the substitution comes without explanation, I though about rearranging expression (1) by Maple commands in a way that facilitates visual pattern matching.
How to collect the factor 1+x in (1) leading to  sqrt(2)/(sqrt(-beta^2+1)*sqrt(2-(1+x)*beta^2))

It looks as one would write by hand.

 

At a glance, this much easier suggest that k^2 = (1+x)*(1/2).

Download Collect_one_plus_x_-_02.mw

(Maple 2025.2 only for easier editing. Results are the same with Maple 2026)

Original Post - Collect_one_plus_x.mw

I am new to evala (and the math behind).

On ?evala,Sqrfree at the first bullet point I was wondering if there isn't a "u" missing here

Can someone confirm?

The below problem has already occured several times to me. In all such instances Maple did not realise that extracting a factor from a square root is the key for further simplification. Doing this by hand is obvious and often easy when extracted factors are positive.  

Did I overlook something? Are there other ways avoid disassembling an expression with the op command?
Should simplify or other commands be improved to adress such problems?

restart

How to transform the left-hand side by commands that it matches the right-hand side

sqrt(x__0+1)*sqrt(-2*beta^2*x__0-2*beta^2+4)*sqrt(-(x__0+1)*(beta^2-1))/((beta^2*x__0+beta^2-2)*(beta^2*x__0+beta^2-x__0-1)) = 2/(sqrt(-beta^2+1)*sqrt(-2*beta^2*x__0-2*beta^2+4))

(x__0+1)^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2)*(-(x__0+1)*(beta^2-1))^(1/2)/((beta^2*x__0+beta^2-2)*(beta^2*x__0+beta^2-x__0-1)) = 2/((-beta^2+1)^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2))

(1)

assumptions := 0 < x__0 and x__0 < 1, 0 < beta and beta < 1

0 < x__0 and x__0 < 1, 0 < beta and beta < 1

(2)

`assuming`([simplify(lhs((x__0+1)^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2)*(-(x__0+1)*(beta^2-1))^(1/2)/((beta^2*x__0+beta^2-2)*(beta^2*x__0+beta^2-x__0-1)) = 2/((-beta^2+1)^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2))))], [assumptions])

-(4+(-2*x__0-2)*beta^2)^(1/2)/((-beta^2+1)^(1/2)*(-2+(x__0+1)*beta^2))

(3)

I have tried the usual simplify and combine commands to remove the square root from the numerator.
Extracting a factor for -2 from the square root would probably make further simplification possible but there is no simple command to do so.

Factor_ := -2

-2

(4)

old := simplify([op(denom(-(4+(-2*x__0-2)*beta^2)^(1/2)/((-beta^2+1)^(1/2)*(-2+(x__0+1)*beta^2))))])

[(-beta^2+1)^(1/2), -2+(x__0+1)*beta^2]

(5)

new := old; new[1] := old[1]/Factor_; new[2] := old[2]*Factor_

[-(1/2)*(-beta^2+1)^(1/2), 4-2*(x__0+1)*beta^2]

(6)

subs(1/old[1] = 1/new[1], 1/old[2] = 1/new[2], -(4+(-2*x__0-2)*beta^2)^(1/2)/((-beta^2+1)^(1/2)*(-2+(x__0+1)*beta^2)))

2*(4+(-2*x__0-2)*beta^2)^(1/2)/((-beta^2+1)^(1/2)*(4-2*(x__0+1)*beta^2))

(7)

expand(simplify(2*(4+(-2*x__0-2)*beta^2)^(1/2)/((-beta^2+1)^(1/2)*(4-2*(x__0+1)*beta^2))))

2/((-beta^2+1)^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2))

(8)

2/((-beta^2+1)^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2)) = rhs((x__0+1)^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2)*(-(x__0+1)*(beta^2-1))^(1/2)/((beta^2*x__0+beta^2-2)*(beta^2*x__0+beta^2-x__0-1)) = 2/((-beta^2+1)^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2)))

2/((-beta^2+1)^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2)) = 2/((-beta^2+1)^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2))

(9)

is(2/((-beta^2+1)^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2)) = 2/((-beta^2+1)^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2)))

true

(10)

Second approach after "discovering" that content works also on square roots

[op(-(4+(-2*x__0-2)*beta^2)^(1/2)/((-beta^2+1)^(1/2)*(-2+(x__0+1)*beta^2)))]

[-1, 1/(-beta^2+1)^(1/2), (4+(-2*x__0-2)*beta^2)^(1/2), 1/(-2+(x__0+1)*beta^2)]

(11)

mul(`~`[`*`](`~`[content]([-1, 1/(-beta^2+1)^(1/2), (4+(-2*x__0-2)*beta^2)^(1/2), 1/(-2+(x__0+1)*beta^2)]), `~`[primpart]([-1, 1/(-beta^2+1)^(1/2), (4+(-2*x__0-2)*beta^2)^(1/2), 1/(-2+(x__0+1)*beta^2)])))

-2^(1/2)*(-beta^2*x__0-beta^2+2)^(1/2)/((-beta^2+1)^(1/2)*(beta^2*x__0+beta^2-2))

(12)

simplify(-2^(1/2)*(-beta^2*x__0-beta^2+2)^(1/2)/((-beta^2+1)^(1/2)*(beta^2*x__0+beta^2-2))) = rhs((x__0+1)^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2)*(-(x__0+1)*(beta^2-1))^(1/2)/((beta^2*x__0+beta^2-2)*(beta^2*x__0+beta^2-x__0-1)) = 2/((-beta^2+1)^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2)))

2^(1/2)/((2+(-x__0-1)*beta^2)^(1/2)*(-beta^2+1)^(1/2)) = 2/((-beta^2+1)^(1/2)*(-2*beta^2*x__0-2*beta^2+4)^(1/2))

(13)

is(%)

true

(14)

NULL

Context: The left-hand side in an integrand which was produced by a change of variables in a elliptic integral. Maple simplifies only halfway which makes validation of the result of the variable change difficult.  

NULL

Related functional programming question: Is a onliner `...`(-(4+(-2*x__0-2)*beta^2)^(1/2)/((-beta^2+1)^(1/2)*(-2+(x__0+1)*beta^2)))from the above content-primpart construct possible?NULL

Download Simplify_radical_02.mw

1 2 3 4 5 6 7 Last Page 1 of 53