# Question:How to specify solution range for solve

## Question:How to specify solution range for solve

Maple

Hey,

I want to solve this equation and looking at the plot there are at least 3 solutions. I want the greatest/smallest negative solution. Unfortunately using solve with assumptions produces no results and solve without assumptions only finds two solutions.

 > #select greatest negative value from solution
 > restart:
 > expr:= ax*cos(lambda)+ay*sin(lambda)-(a+b*lambda)
 (1)
 > ax:=1:ay:=2:a:=0.5:b:=0.25: #examplanatory values
 > plot(expr)
 >
 > assume(-2*Pi
 >
 > sol_lambda:=[solve(expr=0,lambda, useassumptions)];# returns empty list even though without assumption one solution is found
 (2)
 > sol_lambda:=[solve(expr=0,lambda)]; #returns only two solutions even though looking at the plot 3 are there
 (3)
 > sol_l_v:=evalb~(sol_lambda<~0); #dirty workaraound
 (4)
 > sol_l_add:=[ListTools:-SearchAll(true,sol_l_v)] ; #this seems overly complicated
 >
 (5)
 > lambda:=sol_lambda[sol_l_add[-1]];  #to select the last entry
 >
 (6)
 > expr; #test
 >
 (7)
 >