Items tagged with assuming

Feed

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?

d:=(a>0,a<1,b>0,c>0);
                   0 < a, a < 1, 0 < b, 0 < c
e:=(1-a)*b>c;
                         c < (1 - a) b
e/(1-a)assuming(d);
                         `*`(c<(1-a)b,1/(1-a))

Thanks in advance.

inequality.mw

 

 

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

restart

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

assume*{real, psi(t)}

(1)

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)

(2)

``

``

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

Vector[column](%id = 18446744074531387982)

(3)

``


 

Download extract_R_and_I.mw

#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)))]:
#trace(perceptronrule1);
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,

Omkar

 

how can solve using assume option ?

restart:

F(z):=m*z^4-4*m*z^3+(3*m+3)*z^2-6*u;

m*z^4-4*m*z^3+(3*m+3)*z^2-6*u

(1)

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

Error, `<` unexpected

 

 

 

Download assume.mw

Hello,

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

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

restart

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

1/2+(1/2)*5^(1/2)

(1)

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

(1/2)*(-(u-1)*(u+1)*(u^2-u-1))^(1/2)*u*(4*u-3)/(u*(u-1))^(1/2)

(2)

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

(1/2)*u*(4*u-3)*((u+1)*(-u^2+u+1)/u)^(1/2)

(3)

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

(1/2)*(-u^2+u+1)^(1/2)*(u^2-1)^(1/2)*u^(1/2)*(4*u-3)/(u-1)^(1/2)

(4)

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

(1/2)*u*(4*u-3)*((u+1)*(-u^2+u+1)/u)^(1/2)

(5)

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

(1/2)*((u-1)*(u+1)*(-u^2+u+1))^(1/2)*u*(4*u-3)/(u*(u-1))^(1/2)

(6)

``

Radical.mw

 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.

restart:

# The vectors e(i) satify the folowing conditions
e(0)*e(1)=e(n-1) assuming  1<n;
e(0)*e(0)=e(2):
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
e(i)*e(0)=e(i+1);
end do:

# We define the function f
f:=e(0)->e(0)+(n-3)*e(1);
f:=e(1)->(n-2)*e(1);
for i from 2  to 3 do
f:=e(i)->(n+i-3)*e(i)+(i-1)*(n-3)*e(n-3+i);
end do:

for i from 4 to n do
f:=e(i)->(n+i-3)*e(i)
end do:

# We define the two vectors
x:=sum(alpha(k)*e(k),k=0..n);
y:=sum(beta(k)*e(k),k=0..n);

#Question : I would like to compute the following  but there is no display of the solution. 
(x*y);
f(x*y);
f(x);
f(y);
x*f(y);
f(x)*y;
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)

????

thanks...

 

chebyshev.mw

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 trying to simplify the eigenvalues of a 2x2 matrix [[a,b],[c,d]] subject to the condition a,b,c, and d are integers such that a+b = c+d. Why do the following commands not achieve this?

with(LinearAlgebra):

A:=Matrix[[a,b],[c,d]]):

Eigenvalues(A) assuming a::integer,b::integer,c::integer,d::integer,a+b=d+c

How might I achieve what I need?

This is one of these silly ones that crop up every-so-often (and yes, beta, gamma are just the relativistic v/c and energy):

gamma=1/sqrt(1-beta^2);
solve(%,beta);

comes up with ±I*sqrt(-gamma^2+1)/gamma.

While this is not wrong it is nothing I want to throw at any student trying hard enough as it is to keep his/her head above water. What I want is beta=sqrt(1-1/gamma^2) and I am having a devil of a time getting Maple to do this. even doing it "by hand" the I comes in the moment I take the sqrt. "assuming" does not help (and when I try ...assuming beta::positive, gamma > 1 I get an error claiming these to be inconsistent).

What gives?

Mac Dude

1 2 3 Page 1 of 3