Distribute
Usage
Notes
Further Examples
This expresses the distributive law of multiplication over addition.
In[1]:=
|
Out[1]=
|
Here is an equivalent way to write the input.
In[2]:=
|
Out[2]=
|
This is how taking a power distributes over addition.
In[3]:=
|
Out[3]=
|
We can generalize this to an arbitrary function.
In[4]:=
|
Out[4]=
|
Here we distribute over a product instead of a sum (two variations).
In[5]:=
|
Out[5]=
|
In[6]:=
|
Out[6]=
|
This does the same thing as PowerExpand.
In[7]:=
|
Out[7]=
|
In[8]:=
|
Out[8]=
|
The defined function Subsums gives all possible sums of sublists of a list.
In[9]:=
|
In[10]:=
|
Out[10]=
|
The defined function TruthTable gives the truth table corresponding to a logical expression. DisplayTruthTable displays the output from TruthTable in tabular form.
In[11]:=
|
In[12]:=
|
This gives the truth table for Implies[Or[A, B], C].
In[13]:=
|
Out[13]=
|
|