Message Boards Message Boards

How can I Rationalize this?

Hi everyone, I want to make this expression in Wolfram:

enter image description here

it results from resolve this:

sol=s/.Solve[s^2+(R/L)s+1/(L*C1)==0,s]

it give me this: enter image description here

and this what I was trying:

FullSimplify[Expand[Simplify[sol,C1>0]],ExcludedForms->-R/(2L)]

enter image description here

how can I introduce the "2L" expression on to the root?

7 Replies

Something like this?

(sol = s /. Solve[s^2 + (R/L) s + 1/(L*C1) == 0, s] // Expand) /.  Sqrt[x__]/(a_ Sqrt[y_]) :> Sqrt[x/(y  a^2)]
POSTED BY: Hans Dolhaine

Thank you, it is what I need but with the number "2" on to the root too, this is what I have done:

((sol = s /. Solve[s^2 + (R/L) s + 1/(L*C1) == 0, s] // Expand) /.Sqrt[x__]/(a_ *Sqrt[y_]) :> Sqrt[x/(y *a^2)])/.Sqrt[(x_+y1_)/(y_ *a_^2)]:>Sqrt[x/(y *a^2)+y1/(y *a^2)]

it give me this: enter image description here

I'm so close to have the expression I want, pls how can I put the "(1/2)" on to the root y try to put this "#" but the command doesn't recognize the number.

Thank you for helping me.

Posted 2 years ago

Hmmm, Seems that is only cosmetics. Mathematica simplifies the expression with the two (meaning four) in the square root

aa = ((sol = 
      s /. Solve[s^2 + (R/L) s + 1/(L*C1) == 0, s] // Expand) /. 
    Sqrt[x__]/(a_*Sqrt[y_]) :> Sqrt[x/(y*a^2)]) /. 
  Sqrt[(x_ + y1_)/(y_*a_^2)] :> Sqrt[x/(y*a^2) + y1/(y*a^2)]


bb = aa /. Sqrt[x__] -> xx /. xx -> 2 yy /. 
  yy -> Sqrt[(-(4/(C1 L)) + R^2/L^2)/four]

But

bb /. four -> 4
POSTED BY: Updating Name

For printing (only) purposes you may write

bb /. four -> "4"
POSTED BY: Hans Dolhaine

or like this - still not giving the form you want, but at least without string, so you can use it in futrue calculations

aa /. a_ Sqrt[x_] -> Sign[a] xx /. xx -> Sqrt[(R/(2 L))^2 - 1/(L C)]
POSTED BY: Hans Dolhaine

Thank you guys, you're the boss we got it the expression, well something like that, this is the final code:

aa = ((sol = s /. Solve[s^2 + (R/L) s + 1/(L*C1) == 0, s] // Expand) /. 
    Sqrt[x__]/(a_*Sqrt[y_]) :> Sqrt[x/(y*a^2)]) /. 
  Sqrt[(x_ + y1_)/(y_*a_^2)] :> Sqrt[x/(y*a^2) + y1/(y*a^2)];
bb = aa /. Sqrt[x__] -> xx /. xx -> 2 yy /. 
  yy -> Sqrt[(-(4/(four*C1*L)) + R^2/(four*L^2))];
  bb /. four -> "4" 

and this is the final result: enter image description here

Finally I just put "four" as divisor, I'm new in this and you help me, thousand thanks to you guys it is what I want to do.

Note: where can I found more information about pure functions in wolfram or symbolic manipulation? the examples of Wolfram introduction are basics.

Wow! It is exactly what I want to do, thank you.

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