Message Boards Message Boards

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

distribute/ square/ sinus

Posted 10 years ago

Good afternoon, I have this function:

Sin[Sqrt[b^2 ((Sqrt[k\[Sigma]] m)/(a b) - m^2/a^2)] \[Pi]]

I want to distrabute the b² into the parenthese :

Sin[\[Pi] Sqrt[ (b Sqrt[k\[Sigma]] m)/a  - (b^2 m^2)/a^2] ]

The Mathematica instruction Distribute allowed to make this, but for one function without the square, and without sinus. I make one Mathematica file, as an attachment. Greetings.

Attachments:
POSTED BY: chemsou

Every time pattern matching in Mathematica seems not to work, e.g. one has

In[10]:= Expand[b^2 ((Sqrt[k\[Sigma]] m)/(a b) - m^2/a^2)]
Out[10]= (b Sqrt[k\[Sigma]] m)/a - (b^2 m^2)/a^2

but gets nevertheless

In[9]:= Sin[Sqrt[b^2 ((Sqrt[k\[Sigma]] m)/(a b) - m^2/a^2)] \[Pi]] /. Sqrt[o_] -> Sqrt[Expand[o]]
Out[9]= Sin[Sqrt[b^2 ((Sqrt[k\[Sigma]] m)/(a b) - m^2/a^2)] \[Pi]]

the internal representation of the expression using FullForm should be inspected:

In[17]:= FullForm[Sin[Sqrt[b^2 ((Sqrt[k\[Sigma]] m)/(a b) - m^2/a^2)] \[Pi]]]
Out[17]//FullForm= <snip>

doing so you proceed as follows

In[20]:= Sin[Sqrt[b^2 ((Sqrt[k\[Sigma]] m)/(a b) - m^2/a^2)] \[Pi]] /. Power[o_, Rational[1, 2]] :> Power[Expand[o], Rational[1, 2]]
Out[20]= Sin[Sqrt[(b Sqrt[k\[Sigma]] m)/a - (b^2 m^2)/a^2] \[Pi]]
POSTED BY: Udo Krause
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