## 39 Reputation

13 years, 305 days

## symbolic computation after using SOLVE(...

Maple

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

## taking the values of a solution with sol...

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

Jean-Jacques

## How to do that a conditional es evaluate...

Maple

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

## Boole command/function...

A simple question.

In Mathematica there is a function Boole:

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

## Problems listcontplot /function when n=...

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
﻿