## 133 Reputation

17 years, 70 days

This is great!

## Thank you!...

Thank you, Tim and Alex!

This is kind of tricks I was trying to get (though I would never think of transforming it in 3d!)

## Thank you...

Thank you, David!

## Legends and Labels (and bugs)...

Hello, David,

Thank you very much for your answers, especially, for the second one!

However, when I use it, a strange phenomenon occurs: only the piece of the curve but not the label for the last curve is displayed (before this "magic string" everything was displayed).

Do you know  why and what can be done about it?

I cannot replicate this with a simple example (and what I have is too large and too messy).

Thank you!

Mikhail

## Legend: math symbols & how to have not a...

I have Maple 10, and the command

```plot(x^2, x=-1..1, labelfont=[TIMES], font=[SYMBOL], legend = f);
```

does not work in Classic Worksheet but does in Standard. Can I do the same (math symbols in legend) in Classic?

Another question: I do not want to have all the curves in the legend (such as diagonal or some thresholds). With the command "plot" this is impossible as legend must contain the same number of items as plotted. I was trying to do it using "display":

```restart:
with(plots):
plot_f := plot(x^2,x=0..1,legend="x^2"):
diagonal := plot(x,x=0..1):
display({plot_f, diagonal});
```

However, it still makes a legend with both curves! How can I not have diagonal in the legend?

Thank you!

## Thank you!...

Thank you for the tips! I was not aware of none of them.

## Thank you (and a little question)...

Thank you very much! I am not sure I understand why it works exactly but it does!

Is there a way to make fsolve to look for all the solutions? If I know how many there are, can it help?

## It does work in the example...

It does work in the example I gave. However, my problem is more complicated. I have something like the following:

with(Optimization);

f := proc(x,y,t)
(1-x)*x+(1-y)*(y-x)
end proc;

fmax := proc(t)
local solution;
solution := Maximize(f(x,y,t),{y>=x},x=t..1, y=t..1, output = solutionmodule);
(solution:-Results)(objectivevalue);
end proc:

a:=fsolve('fmax(t)'=0,t=0..1);

#the solution does not exist

If I ask type(a,numeric); it gives

Error, (in Optimization:-QPSolve) could not store t in a floating-point rtable

(I have also other cases (with other functions), where it gives

Error, (in fmax) too many levels of recursion

## Thank you...

Thank you very much, acer and alec, it works!

## fsolve with a procedure...

Alec, it does not seem to work.

When I write fsolve(f=0.4,0..0.9); the error is

Error, (in fsolve) Can't handle expressions with typed procedures

And when I write fsolve('f(t)'=0.4,t=0..0.9); it returns the expression without solving

fsolve(f(t) = .4,t,0 .. .9)

(and I replaced 0.5 by 0.4 so that the solution exists).

## fsolve with a procedure...

It seems to me that the problem is not related to the fact that there is a system of equations. I get the same error

Error, (in fsolve) {x,y} are in the equation, and are not solved for

when I have only one equation to solve that involves a procedure (and x and y are local variables in that procedure)

Here it is:

f := proc(t)
local x, y;
maximize((1.3-x)*x+0.3*(1-y)*(y-x), x=t..0.9, y=t..0.9);
end proc;
fsolve(f(t)=0.5,t=0..0.9);

What is the problem? How can I solve it?
Thank you!

## fsolve...

It seems to me that the problem is not related to the fact that there is a system of equations. I get the same error

Error, (in fsolve) {x,y} are in the equation, and are not solved for

when I have only one equation to solve that involves a procedure (and x and y are local variables in that procedure)

f := proc(t)
local x, y;
maximize((1.3-x)*x+0.3*(1-y)*(y-x), x=t..0.9, y=t..0.9);
end proc;
fsolve(f(t)=0.5,t=0..0.9);

What is the problem? How can I solve it?

Thank you!

## Version that works in Maple 10...

Thank you very much,Robert! It works wonderfully! Mikhail
 Page 1 of 1
﻿