jean-jacques

39 Reputation

10 Badges

14 years, 172 days

MaplePrimes Activity


These are questions asked by jean-jacques

Hello,

I want to use the values of the solutions of

sol := solve({x+y=a, x-y=b}, {x,y});

I would like to be able to continue some symbolic computationg, for example

 

dernier:= sol[1]/sol[2];

 

but I get an error message.

 

How can I take only the values of x (and not the expression x= something) to compute, for example "dernier"?

 

Thanks in advance,

 

I use SOLVE command

>solu=solve({x+y=a, x-y=b}, {x, y});

solu = {x = (1/2)*b+(1/2)*a, y = -(1/2)*b+(1/2)*a}

>solu[1];
solu[1]

(which shows the solution value for x is not solu[1]).

I would like to use the values of x and y in SOLU to continue with some symbolic computation.

 

How do I recover -FROM SOLU- the values of X and Y (solutions)?

Thanks in advance,

 

Jean-Jacques

Dear friends,

 

I can compute,  with Maple 14, summe1:

> summe1= sum( sum( (`if`(1 < x , 1, 0))*   x*j, x=0..2), j=0..2);

 

However, when I modify  summe1 to summe2, I get an error message:

 

> summe2= sum( sum( (`if`(1 < x+j , 1, 0))*  (x*j), x=0..2), j=0..2);

 

> Error, (in eval/if) cannot determine if this expression is true or false: 1 < j

A simple question.

In Mathematica there is a function Boole:

Boole[expr]
yields 1 if expr is True and 0 if it is

Hello Maple experts,

I have some problems.  I can show a plot of f1, after assuming  n= 200 [Here x and y are positives and less than 1]

 

> f1 :=  (x, y,n) -> add(add(  `if` (.5 <= x+j*y+(1/n-(1/n)*x-(1/n)*y)*k and j*y+(1/n-(1/n)*x-(1/n)*y)*k < .5 , (1/(n+1)*(n+2))* factorial(k+j) *  factorial(n+1-j-k)/(factorial(k)*factorial(n-k)), 0), k = 0 .. n), j = 0 .. 1) :

> with(plots);

> listcontplot(...

3 4 5 6 7 Page 5 of 7