Items tagged with assuming

Hello people in mapleprimes,

I want to modify the inequality of e assuming d.
But, e/(1-a) assuming(d) does not work well.
How can I do for this?

                   0 < a, a < 1, 0 < b, 0 < c
                         c < (1 - a) b

Thanks in advance.



I can't get the Real and Imaginary parts of matrix to seperate out as required. It is an SU(2) matrix. Want to convert is to a 4 Vector (quaternion). I think because Maple doesnt know what psi(t) is being conservative so to speak. Tried assume, assuming...


assume*{psi(t), 'real'}

assume*{real, psi(t)}


V := Matrix(2, 2, {(1, 1) = (1/4)*cos((1/2)*psi(t))*sqrt(2)*sqrt(4-2*sech((1/6)*sqrt(3)*t))-I*cos((1/2)*psi(t))*sqrt(2)*tanh((1/6)*sqrt(3)*t)/sqrt(4-2*sech((1/6)*sqrt(3)*t))-((1/2)*I)*sin((1/2)*psi(t))*sqrt(2)*sqrt(3)*sech((1/6)*sqrt(3)*t)/sqrt(4-2*sech((1/6)*sqrt(3)*t)), (1, 2) = (1/2)*cos((1/2)*psi(t))*sqrt(2)*sqrt(3)*sech((1/6)*sqrt(3)*t)/sqrt(4-2*sech((1/6)*sqrt(3)*t))+((1/4)*I)*sin((1/2)*psi(t))*sqrt(2)*sqrt(4-2*sech((1/6)*sqrt(3)*t))-sin((1/2)*psi(t))*sqrt(2)*tanh((1/6)*sqrt(3)*t)/sqrt(4-2*sech((1/6)*sqrt(3)*t)), (2, 1) = ((1/4)*I)*sin((1/2)*psi(t))*sqrt(2)*sqrt(4-2*sech((1/6)*sqrt(3)*t))+sin((1/2)*psi(t))*sqrt(2)*tanh((1/6)*sqrt(3)*t)/sqrt(4-2*sech((1/6)*sqrt(3)*t))-(1/2)*cos((1/2)*psi(t))*sqrt(2)*sqrt(3)*sech((1/6)*sqrt(3)*t)/sqrt(4-2*sech((1/6)*sqrt(3)*t)), (2, 2) = ((1/2)*I)*sin((1/2)*psi(t))*sqrt(2)*sqrt(3)*sech((1/6)*sqrt(3)*t)/sqrt(4-2*sech((1/6)*sqrt(3)*t))+(1/4)*cos((1/2)*psi(t))*sqrt(2)*sqrt(4-2*sech((1/6)*sqrt(3)*t))+I*cos((1/2)*psi(t))*sqrt(2)*tanh((1/6)*sqrt(3)*t)/sqrt(4-2*sech((1/6)*sqrt(3)*t))})

Matrix(%id = 18446744074495800014)




v := Vector(4, [Re(V[1, 1]), Im(V[1, 2]), Re(V[2, 1]), Im(V[1, 1])])

Vector[column](%id = 18446744074531387982)





#my testing for wildcard to one
#after testing, it loop a very long time and not stop
ppp := [[0,0,0,x],[0,0,1,0],[0,1,0,0],[1,0,0,0]]:
check1 := [seq(0,ii=1..nops(ppp))];
ttt1 := [[0,0,0,1],[0,0,1,0],[0,1,0,0],[1,0,0,0]]:
mmmeaght1 := [seq(0,ii=1..nops(ppp[1]))]:
bbb1 := [seq(0,ii=1..nops(ppp[1]))]:
emap := [(xx) -> if [xx < 0 assuming x > 0] then 0 else 1 end if, (xx) -> evalf(1/(1+exp(xx)))]:
MM(ppp, ttt1, mmmeaght1, bbb1, check1, emap);

when test wildcard variable for input, would like to assume x > 0 then

i try assuming x > 0 , got error


I want to solve for the roots of a polynomial, such as a x^2+b x + c = 0, for which the output is only the positive root. All coefficients/variables in the polynomial are positive. 

Recently, someone posted an answer to a question where at some point they performed this task and their solution was really slick. But I can't find it. The answer used either solve, or eval or something like that. (Yes, I did perform a search via the MaplePrimes search before asking this question.) 


Dear Friends, 

I would appreciate your help in resolving some issues. Let me describe my dummy code and the issues I am having. 

1. I have two functions f(x,a) and g(x,a) are well defined. 

2. I need to get roots of f(x,a). I am using the command soln := Roots(f(x,a)) which gives me a list of all possible values of x. 

3. I need to choose only one element -- say x* -- from the list "soln" such that x*=argmax{g(x,a) | g(x,a)>0 for x in soln}.

I am not able to find a technique (i) to evaluate g(x,a) for all elements of the list "soln", (ii) and select x* that maximizes g(x,a). 

Picking and choosing elements of the list one by one is difficult since the number of elements in the list can vary with parameter "a" and it would complicate the matter in numerical studies. 

I would sincerely appreciate any inputs in this regard. 

Thank you,



how can solve using assume option ?





solve(F(z),z assuming -0.5<m<0.5, 0<u<0.5)

Error, `<` unexpected






In the creation of a list, I would like to use the assume function twice.

Here it is a print screen of my issue.

The second part of the list is not taken into account.

Do you have ideas so that my list takes into account the second term ?

Thanks a lot for your feedback

The question in the title has been raised before over the years, but has maybe not received enough attention.
Reraising the question was motivated by a comment by Kitonum to a recent post on improved integration results in Maple 2016:

Consider the following session.
n^2; #Returns n^2
eval(%);#Returns n^2
sin(n*Pi); # Returns 0
sin(n); # Returns sin(n)
eval(%); # Returns sin(n)
ln(n); #Returns ln(n)
ln(n*exp(1)); # Returns ln(n*exp(1))
expand(%); # Error, (in ln) numeric exception: division by zero
ln((n+1)*exp(1)); Returns ln((n+1)*exp(1))
expand(%); # Returns ln(n+1)+1
sqrt(n^2); # Returns 0
sqrt(n); # Returns n^(1/2)
eval(%,n=n^2); # Returns (n^2)^(1/2)
simplify(%); #Returns 0: simplify doesn't help in the examples above.
We see that assume n=0 certainly doesn't imply that expressions always will be evaluated at n=0, but sometimes it appears that it does.
So what is the intended behavior when assuming equality?
Several years ago (Maple 14 or earlier) I overloaded assuming so that equality assumptions were handled by eval.
There was a discussion at the time in MaplePrimes about this. Shall try to find the link.

In this question, I asked for a way to simplify an expression containing radicals. The discussion led us to that as default field for simplicfication is the Complex number system we should use assume or assuming command to simplify the radicals. However, the mothod suggested there seems to not work in this new case that I have. For details please see the attached file. The terms sqrt{u} and sqrt{u-1} should cancel in denominator.

 What Maple Does


`&varphi;` := (1+sqrt(5))*(1/2)



f := (1/2)*sqrt(-(u-1)*(u+1)*(u^2-u-1))*u*(4*u-3)/sqrt(u*(u-1))



`assuming`([combine(f)], [1 < u and u < `&varphi;`])



`assuming`([simplify(f)], [1 < u and u < `&varphi;`])



`assuming`([combine(f, radical)], [1 < u and u < `&varphi;`])



`assuming`([simplify(f, radical)], [1 < u and u < `&varphi;`])




 Remark by Markiyan Hirnyk. The below content is added by the questionner on 08.02.2016 .

What Mathematica Does


How to solve the inequality


assuming a::real ?

Of course, with Maple. I'd like to demonstrate the difficulties, solving

>solve(log[2*abs(x-a)](abs(x+a)+abs(x-a)) < 1, x) assuming a > 0, a < 1/2


The correct answer under the above restrictions is

{x  > 0, x  <  a} union {a  <  x, x <  a + 1/2} union { -infinity < x, x < a - 1/2}.

This is a problem from Lviv math school olympiad '2016.



Dear all;


Hello everybody, I need your help to dispaly some values obtained using my function f. When I run the code there is no results obtained. Many thanks.


# The vectors e(i) satify the folowing conditions
e(0)*e(1)=e(n-1) assuming  1<n;
e(1)*e(1)=e(n-1) assuming  1<n: :
e(2)*e(1)=e(n) assuming  1<n:
for i from 1  to n-1 do
end do:

# We define the function f
for i from 2  to 3 do
end do:

for i from 4 to n do
end do:

# We define the two vectors

#Question : I would like to compute the following  but there is no display of the solution. 
f(x*y)- f(x)*y-x*f(y);

hi.for linear coupling equation

dsys3 := {-72.49829200*(diff(f1(x), x, x))+0.8377580411e-2*(diff(f2(x), x))-8.873545400*10^9*(diff(f3(x), x))+2.114533515*10^18*f1(x), -878.8477313*(diff(f2(x), x, x))+1.590065471*10^20*f2(x)-7.353421206*10^(-26)*(diff(f3(x), x, x))+4.891459762*10^10*f3(x), 4.027667395*10^(-20)*(diff(f3(x), x, x, x, x))-0.6274394007e-2*(diff(f3(x), x, x))+8.873545401*10^9*(diff(f1(x), x))-7.352113720*10^(-26)*(diff(f2(x), x, x))+4.904509456*10^10*f2(x)+1.208381068*10^19*f3(x)-2.499990383*10^26*omega*(diff(f3(x), x, x))}

by assuming and to expand these functions(f1-f2-f3) in polynomial form(e.g. Chebyshev, power polynomials, Legendre and etc).:

f1(x):=(&sum;)H[i] *(e)^(lambda[i] *x); f2(x):=(&sum;)alpha[i]*H[i] *(e)^(lambda[i] *x);f3(x):=(&sum;)GAMMA[i]*H[i] *(e)^(lambda[i] *x)


how i detemine lambda[i] which are roots of the  characteristic equations?in other word how i can build characteristic relation for coupling equation?

2)how i can gain value for alpha[i] and GAMMA[i]

by using equation

Q1 := subs(x = 0, sum(H[i]*exp(lambda[i]*x), i = 1 .. 8)); Q2 := subs(x = L, sum(H[i]*exp(lambda[i]*x), i = 1 .. 8)); Q3 := subs(x = 0, sum(alpha[i]*H[i]*exp(lambda[i]*x), i = 1 .. 8)); Q4 := subs(x = L, sum(alpha[i]*H[i]*exp(lambda[i]*x), i = 1 .. 8)); Q5 := subs(x = 0, sum(GAMMA[i]*H[i]*exp(lambda[i]*x), i = 1 .. 8)); Q6 := subs(x = L, sum(GAMMA[i]*H[i]*exp(lambda[i]*x), i = 1 .. 8)); M := diff(sum(GAMMA[i]*H[i]*exp(lambda[i]*x), i = 1 .. 8), x); Q7 := subs(x = 0, M); Q8 := subs(x = L, M)



Hello !!

I want to replace the word "assuming" with another word. I tried to write:

> as:=assuming;

> alias(as=assuming);

> `&as`:=proc(a,b) a assuming b; end;

The first two methods are not allowed. The last one doesn't work like "assuming".

Is there any solution to this problem ?


I am very confused about function is():


1. is(a-b=0) assuming a::real,b::real,a^2=b^2,a>0,b>0;

2. is(a-b=0) assuming a::real,b::real,a^2=b^2,a>=0,b>=0;


the first command gives me false, and the second command gives me true...


any thoughts?

1 2 3 Page 1 of 3