Items tagged with realdomain


See the below. The two answers should be identical, but they are not.




Let us look in RealDomain and then in the RealDomain:-solve command. One is addressed to the usual solve command. The commands of the RealDomain package are not still documented since Maple 7 when the package was introduced. There is a general description only 

  • By default, Maple performs computations under the assumption that the underlying number system is the complex field. The RealDomain package provides an environment in which computations are performed under the assumption that the basic underlying number system is the field of real numbers.
  • Results returned by procedures are postprocessed by discarding values containing any detectable non-real answers or replacing them with undefined where appropriate.

The above is not enough. Here is an example which confuses me: 

RealDomain:-solve(exp(I*x) = -1, AllSolutions);


solve(exp(I*x) = -1, AllSolutions);
                         Pi (2 _Z1 + 1)


RealDomain:-solve(exp(I*x) = -1);

I lie awake thinking about that. Maplesoft staff help me!

I have in mind all the real roots of the equation 2*tan(Pi*t^2)-tan(Pi*t)+tan(Pi*t)*tan(Pi*t^2)^2 = 0.

Maple fails with it:

>RealDomain:-solve(2*tan(Pi*t^2)-tan(Pi*t)+tan(Pi*t)*tan(Pi*t^2)^2 = 0, t);


 Even its numerical solution has gaps.

>Digits := 15; a := Student[Calculus1]:-Roots(2*tan(Pi*t^2)-tan(Pi*t)+tan(Pi*t)*tan(Pi*t^2)^2 = 0, t = -2 .. 2);
Warning, some roots are returned as numeric approximations
 [-1.35078105935821, -1.18614066163451, -1.00000000000000, 0, 

   1.00000000000000, 1.28077640640442, 1.68614066163451,    1.85078105935821]



>b := Student[Calculus1]:-Roots(2*tan(Pi*t^2)-tan(Pi*t)+tan(Pi*t)*tan(Pi*t^2)^2 = 0, t = -2 .. 2, numeric);
 [-1.35078105935821, -1.18614066163451, -1.00000000000000, 

   -0.780776406404415, 0., 1.00000000000000, 1.28077640640442, 

   1.68614066163451, 1.85078105935821, 2.00000000000000]


>plot(2*tan(Pi*t^2)-tan(Pi*t)+tan(Pi*t)*tan(Pi*t^2)^2, t = -2 .. 2);

shows 14 solutions.

The output of the command


[1/4-(1/4)*sqrt(41), 1/4-(1/4)*sqrt(33), -1, 0, 1, 1/4+(1/4)*sqrt(17), 1/4+(1/4)*sqrt(33), 1/4+(1/4)*sqrt(41)]

suggests a closed-form expression for the roots.

Hello people in mapleprimes,


I tried to solve y=x^3 for x, expecting of getting a result of x^(1/3),

through using restart;assume(x::real,y::real);

But, the result was:

Warning, solve may be ignoring assumptions on the input variables.
             (1/3)    1  (1/3)   1    (1/2)  (1/3)  
            y     , - - y      + - I 3      y     ,
                      2          2                  

                1  (1/3)   1    (1/2)  (1/3)
              - - y      - - I 3      y     
                2          2                


It means that solve couldn't use the assumption of x and y being real.

On the other hand, reading RealDomain package, y^(1/3) is returned properly:



What I want to ask you is

Aren't there ways other than using the RealDomain package, to obtain the solution of y^(1/3)?


I will be very glad if you give me answers.


Best wishes.


I want to solve the equation

sqrt(x)+sqrt(-x^2+1) = sqrt(-4*x^2-3*x+2)

in Real domain. I tried

RealDomain:-solve(sqrt(x)+sqrt(-x^2+1) = sqrt(-4*x^2-3*x+2), x);

and I got -5/9+(1/9)*sqrt(34).

But, with Mathematica, I posted my question at

Mathematica had two solutions 

x ==-1-Sqrt[2]|| x ==1/9(-5+Sqrt[34])

If I understand correctly, when Maple solve in RealDomain of this equation, the solution of equation must satisfy conditions x>=0 and -x^2+1 >=0 and -4*x^2-3*x+2 >=0. Therefore, the number

x ==-1-Sqrt[2] 

is not a solution. My question is the given equation has one solution (Maple) or two solutions (Mathematica)?

Is there any some kind of environment variable(or command,package, anything...) that I can play with to tell maple consider all the constrants implied by the given expression


For Example, I want to simplify the following equation(this equation's final form is "0=0" if you take the implied constraints into account.)

 "(4*a^3*b)^(1/2)/(-(a/(4*b))^(1/2))+(4*a^3*b*(4*b/a))^(1/2) = 0" 

in real domain and this equation implies that variable a and b are both negative or positive because of the sqrt operation. And neither a nor b should be zero because they are part of a fraction's denominator.

but if i simply tell maple to simplify this equation, all the constrants will be ignored by maple, even if i use RealDomain package.

What is the best way to solve for the simple equation X^2+y^2=1[m]^2 symbolically for either x or y? I actually have a huge list of equations and want to solve the group but my problem boils down to the issue here where I get two possible solutions though using the assumption one is clearly negative and the assumption used should exclude negative results (see attempt below). Also solve doesn't seem to work with units either...  any ideas? Can I give the variables units in a meaningful way?



f := x^2+y^2 = 1;

                            x^2+y^2 = 1

assume(y > 0)

a := y > 0

y1 = solve(f, y, useassumptions = true)

                          y1 = (sqrt(-x^2+1), -sqrt(-x^2+1))


y2 = solve({a, f}, y)

                          y2 = ({y = sqrt(-x^2+1)}, {y = -sqrt(-x^2+1)})


Why is y = -sqrt(-x^2+1) a solution?

Also, how do I use units when trying to solve 


f := x^2+y^2 = Unit('m')^2;
                           x^2+y^2 = Unit('m')^2

assume(x > 0);
assume(y > 0);
d = solve(f, y, useassumptions = true);

Error, (in Units:-Standard:-+) the units `m^2` and `1` have incompatible dimensions




I want to solve the equation sqrt(x) + sqrt(1 - x^2) = sqrt(2 - 3*x - 4*x^2) in RealDomain. I tried

RealDomain:-solve(sqrt(x) + sqrt(1 - x^2) = sqrt(2 - 3*x - 4*x^2),x);

And I got one solution. But, at here 

At here 

they said the given equation has two real solutions. How must I understand?

I want to solve the equation 2*x-x*sqrt(x)-1)^(1/3)+sqrt(x)+(1-2*x)^(1/3) = 0 in real numbers. I tried

> restart:


solve((2*x-x*sqrt(x)-1)^(1/3)+sqrt(x)+(1-2*x)^(1/3) = 0);

Maple out put loss the solution x = 0. I don't understand why.

The following example has been a cornerstone in the computer lab exercises for Calculus II:

a := n -> (-1)^n*arctan(n):
Limit( a(n), n=infinity ):
% = value( % );
/ n \ 1 1 1 1
lim \(-1) arctan(n)/ = - - Pi - - I Pi .. - Pi + - I Pi
n -> infinity 2 2 2 2

Dear MaplePrimes,


I have a problem findning an explicit solution to an equation solve((P[h]-tau[h])*q[hf] = (P[f]-tau[f])*q[fh], [lambda[h]])]. Is you can see from my syntax, I have assumed a RealDomain and also that all parameters including the varialbe I'm solving for lambda[h] are positive, and also that lambda[h] is between 0 and 1. This is my syntax:


test := `assuming`([RealDomain:-solve((P[h]-tau[h])*q[hf] = (P[f]-tau[f...

Page 1 of 1