## Still undocumented RealDomain package

Maple 2016

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);
NULL```

though

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

and

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

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

## RealDomain and fieldplot: fieldstrength=log option...

fieldplot is a wonderful tool for plotting vector fields. The option 'fieldstrength' is very useful to scale the arrows so that one can better visualize the field. I often use fieldstrength=log.

However, if one includes the RealDomain library, the fieldstrength=log option fails. I don't see why it should. Can someone enlighten me before I report this as a bug.

## How to solve this trig equation?...

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);

RootOf(tan(_Z)*tan(_Z^2/Pi)^2-tan(_Z)+2*tan(_Z^2/Pi))/Pi```

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]

>nops(a);

8

>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]
>nops(b);
10```

whereas

`>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

```>identify(a);

[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.

## Real solution x of equation y=x^3...

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);
b:=y=x^3;
solve(b,x);

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:

with(RealDomain):
solve(b,x);
(1/3)
y

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)?

Best wishes.

taro

## Algebraic equation over reals...

I have problem to get real answer in a simple equation. maple just give me complex answer.

how i can get parametric real answer? Ihave trid this two way but not applicaple.

with(RealDomain); assume(T::real)

My code is:
Qz := 7.39833755306637215940309264474*10^7*sqrt(1/T)*(T-297.2)/T-16242.7935852035929839431551189*sqrt(1/T)/T;

q := (.6096*(299.2-T))/(sqrt(1.60000000000000000000000000000*10^(-9)-r^2)-0.346410161513775458705489268300e-4);

with(RealDomain); assume(T::real);

e := simplify(solve({0 = q-Qz}, {T}))

and the result like:

e := {T = 1/RootOf(-609600000000000000000000000000000000000000000000000000000+(879515018020273730453559011332895956000000000000000000000000000*sqrt(-625000000*r^2+1)-761682348615485390130551939524898425387968750740910059296172487)*Z^5+(-2959335021226548863761237057896000000000000000000000000000000*sqrt(-625000000*r^2+1)+2562859306691152293409465394507279449380503585614734443742000)*_Z^3+182392320000000000000000000000000000000000000000000000000000*_Z^2)^2}

dose anyone hase any opinion?

## Problem with RealDomain:-solve...

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 http://mathematica.stackexchange.com/questions/51316/how-can-i-get-the-exact-real-solution-of-this-equation

``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 Maple capable of dealing with expression with i...

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.

## How to solve a system of equation in the real doma...

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?

--------------------------------------------------------------------------------------------------------------------------

restart;

with(RealDomain);
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

-------------------------------------------------------------------------------------------

restart;
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

---------------------------------------------------------------------------------------------

THANKS!

## How to solve that hard system?...

How to solve the system
{sqrt((x-1)^2+(y-5)^2)+(1/2)*abs(x+y) = 3*sqrt(2), sqrt(abs(x+2)) = 2-y}
over the reals symbolically? Of course, with Maple. Mathematica does the job.

## The following equation has one or two real solutio...

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 http://mathematica.stackexchange.com/questions/51316/how-can-i-get-the-exact-real-solution-of-this-equation

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

## Why this equation loss solution x = 0?...

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:

with(RealDomain):

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.

## Is it possible to have Maple return a student-frie...

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 Pin -> infinity                       2      2         2      2     `