Hello!:(adsbygoogle = window.adsbygoogle || []).push({});

I want to know if it's possible to use the Collect command in a function. For example, I have this code:

Subscript[E, 1] = \!\(

\*SubscriptBox[\(\[PartialD]\),

SubscriptBox[\(\[Omega]\), \(1\)]]

\*SubscriptBox[\(\[Pi]\), \(m1\)]\);

Subscript[E, 2] = \!\(

\*SubscriptBox[\(\[PartialD]\),

SubscriptBox[\(\[Omega]\), \(2\)]]

\*SubscriptBox[\(\[Pi]\), \(m2\)]\);

osol = Solve[

Subscript[E, 1] == 0 && Subscript[E, 2] == 0, {Subscript[\[Omega],

1], Subscript[\[Omega], 2]}];

(*Solucion*)

Subscript[\[Omega], 1] = Subscript[\[Omega], 1] /. osol[[1, 1]];

Subscript[\[Omega], 2] = Subscript[\[Omega], 2] /. osol[[1, 2]];

And I want [\[Omega], 1] to be factorized by \gamma and \beta, because the expresion that mathematica gives to me it's huge. So I would like to do something like:

Collect[Subscript[\[Omega], 1] = Subscript[\[Omega], 1] /. osol[[1, 1]];,{β,γ}]

I apologize for my English. I'm from Chile =)

Thank you very much.

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Using Collect in functions, Mathematica

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads for Using Collect functions |
---|

MATLAB Coding up the step function |

Bi-exponential function fitting in Origin Lab SW |

Using Maxima to plot error in Fourier series |

MATLAB Solving equation with integration using MATLAB |

**Physics Forums | Science Articles, Homework Help, Discussion**