Questions tagged [simplification]
249 questions
1
vote
1 answer
How to simplify the union of two expressions: Z3 solver
The result produced by the SMT solver is:
(or (and (>= c1 2) (<= c1 4) (= (+ c0 c1 c2) 5) (= (+ c0 c1) 4))
(and (>= c1 1) (<= c1 3) (= (+ c0 c1 c2) 5) (= (+ c0 c1) 4)))
But I am expecting something like:
(and (>= c1 1) (<= c1 4) (= (+ c0 c1 c2)…

Nishanthan Kamaleson
- 37
- 6
1
vote
1 answer
How do I simplify an easy equation?
I've got this little equation:
4*q+5*(1-q)=6*q+3*(1-q);
ratsimp simplifies both sides independently:
ratsimp(%);
5−q=3*q+3
but how would I turn it into 4*q=2, or 4*q-2=0?
(Obviously solve will give q=1/2, what I mean is how to do I get maxima to…

John Lawrence Aspden
- 17,124
- 11
- 67
- 110
1
vote
1 answer
Can someone explain the simplification of this boolean algebra equation?
I think I missed reading a theorem or postulate or something..
The equation is: wy + wxz + xyz
According to my professor, the simplification is (which she didn't explain how):
wy + xz(w'y + wy')
= wy + xz (w XOR y)
Where did that (w'y + wy') came…

Daisy Lopez
- 19
- 1
1
vote
1 answer
Simplification of square root of sum
Using SymPy, can I automatically simplify something like this:
sqrt(a**2 + 2ab + b**2)
to:
[(a+b), -(a+b)]?

mrkwjc
- 1,080
- 8
- 17
1
vote
1 answer
How to simplify or factor an expression of non commuting variables
so this question is most likely very simple and I have seen similar questions on here but none which quite seem to work for me. I am quite the amateur with Mathematica as I never really have much cause to use it so please do not assume much…

John D Evans
- 11
- 2
1
vote
2 answers
Simplify coding trycast vb.net
Consider I have some models as follow: black, green, blue, red.
I have a function which receive an object and I would like to trycast the object to appropriate model.
Now I have the code like this:
Public Sub SetData(ByVal obj As Object)
If…

Buzz
- 321
- 2
- 3
- 20
1
vote
2 answers
Simplifying Regexp
I have the following regexp (using Python syntax):
(\d+)x(\d+)(?:\s+)?-(?:\s+)?([^\(\)]+)(?:\s+)?\((\d+)(?:(?:\s+)?-(?:\s+)?([^\(\)]+))?\)(?:(?:\s+)?\(([^\(\)]+)\))?(?:(?:\s+)?-(?:\s+)?([^\(\)]+) \((\d+)\))?
It matches strings which fit one of the…

p0llard
- 439
- 6
- 17
1
vote
0 answers
How to expand a trigonometric function, consisting 'sin' and 'cos' of any power to 'sin' and 'cos' terms in power of one in Matlab?
We have the following expression:
if:
v(t)=Vrf.sin(Wrf.t)+Vlo.sin(Wlo.t);
then:
v^2(t)=(Vrf.sin(Wrf.t)+Vlo.sin(Wlo.t))^2
which is then simplified…

Majid Rafei
- 59
- 9
1
vote
3 answers
Which laws simplify this boolean expression?
Which laws do I need to use to simplify
!X + (!Y + !Z)*(Y + Z)
to
!X + (Y*!Z) + (!Y*Z)

Meeran
- 91
- 5
1
vote
1 answer
help with multiplying polynomials in lisp
for example: (3x2 - 5x + 2)(7x + 1) and you simplify it like this:
((3 2)(-5 1)(2 0))((7 1)(1 0))
((21 3)(3 2)(-35 2)(-5 1)(14 1)(2 0))
(21 3)(32 2)(9 1)(2 0)
and you get this answer: 21x3 + 32x2 + 9x + 2
i need this solution in lisp please help

iulia
- 19
- 3
1
vote
3 answers
Clearer Format Firebase Android retrieved data
When I retrieve my data it contains brackets { and unique id such as - JSDHGJDGJJSKA ... I want to make it cleaner and get rid of the brackets for e.g. my output is:
{-JfFQQRYnhiKeuN5ERGX={msg=Monday},-JfFQAhQQWIFAUuV1nD4={msg=this is test}}
I want…

nothingness
- 694
- 3
- 9
- 25
1
vote
0 answers
Mesh simplification in three.js
I am using the Constructive Solid Geomery library for Three.js, made by Chandler Prall.
https://github.com/chandlerprall/ThreeCSG
The resulting meshes are accurate, but they are very fragmented (lots and lots of unnecessary triangles), and they…

Björn Morén
- 693
- 5
- 14
1
vote
1 answer
C++ Can I Substitute Nested For Loop with 1 Loop
So I've been trying to do some code simplification, mainly because I'm not that fond of having Nested For loops however I'm experiencing trouble trying to simplify the below code. The code does functions perfectly fine and does as intended (code…

SharkBytes
- 211
- 4
- 18
1
vote
1 answer
Simplifying atan(tan(a+b))
I wonder why this doesn't work as expected:
assume(x+y < %pi/2);
assume(x+y > -%pi/2);
atan(tan(x+y));
It reduces to:
atan(tan(x+y))
i.e. not at all. I would have expected it to reduce to:
x+y

Emily L.
- 5,673
- 2
- 40
- 60
1
vote
5 answers
jQuery Want to get rid of multiple click statements
Here is my website that I've been working on: http://jaakkouusitalo.fi/new As you can see there is those four colored squares, all of the have different classes.
I would like to simplify it, making if and and else statements. I lack skills of…

Jaakko Uusitalo
- 655
- 1
- 8
- 21