Message Boards Message Boards

0
|
3167 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

How do I solve inequalities with conditional expression (variables)?

Posted 10 years ago

Hi Dear Community,

Want to solve the inequality:

-Cos[omega] Cos[psi] Sin[phi] + Sin[omega] Cos[phi] >= 0

where I have conditional expressions:

s[1] - u[1]<psi<s[1] + u[1] and t[1] - u[1]<phi<t[1] + u[1]

where u[i],t[i] and s[i] are values from a string of values.

I want to have an output that either tells me that it is true or not true.

So I wrote the following:

test[omega_] := 
 Simplify[-Cos[omega] Cos[psi] Sin[phi] + Sin[omega] Cos[phi] >= 0, 
  s[1] - u[1] <= psi <= s[1] + u[1] && 
   t[1] - u[1] <= phi <= t[1] + u[1]]

so for omega=0.1, I write: test[0.1]

Eventually I want to make such a function

test[omega,i]:=Table[ Simplify[-Cos[omega] Cos[psi] Sin[phi] + Sin[omega] Cos[phi] >= 0, 
  s[1] - u[1] <= psi <= s[1] + u[1] && 
   t[1] - u[1] <= phi <= t[1] + u[1]],{i,1,imax}]

The problem: The boundaries for phi and psi are not numbers and therefore there are problems evaluating it.

Sorry if I am not completely clear and thanks for any help.

POSTED BY: Marcel Duda
Posted 10 years ago

I notices something more:

If I choose omega=0 therefore Table[test[0, s[i], t[i], u[i]], {i, 1, 5}] he gives me outputs that such as True,False

But if omega is anything else then 0,Pi/2 and I run:

test[omega_, psiFix_, phiFix_, delta_] := 
 FullSimplify[-Cos[omega] Cos[psi] Sin[phi] + Sin[omega] Cos[phi] >= 
   0, psiFix - delta < psi < psiFix + delta && 
   phiFix - delta < phi < phiFix + delta]

Table[test[0.1, s[i], t[i], u[i]], {i, 1, 5}]

I get such crappy outputs:

{1. Cos[phi] >= 9.96664 Cos[psi] Sin[phi], 
 1. Cos[phi] >= 9.96664 Cos[psi] Sin[phi], 
 1. Cos[phi] >= 9.96664 Cos[psi] Sin[phi], 
 1. Cos[phi] >= 9.96664 Cos[psi] Sin[phi], 
 1. Cos[phi] >= 9.96664 Cos[psi] Sin[phi]}
POSTED BY: Marcel Duda
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract