# How can I Rationalize this?

Posted 4 months ago
867 Views
|
7 Replies
|
4 Total Likes
|
 Hi everyone, I want to make this expression in Wolfram: it results from resolve this: sol=s/.Solve[s^2+(R/L)s+1/(L*C1)==0,s] it give me this: and this what I was trying: FullSimplify[Expand[Simplify[sol,C1>0]],ExcludedForms->-R/(2L)] how can I introduce the "2L" expression on to the root? Answer
7 Replies
Sort By:
Posted 4 months ago
 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)] Answer
Posted 4 months ago
 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: 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. Answer
Posted 4 months 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 Answer
Posted 4 months ago
 For printing (only) purposes you may write bb /. four -> "4" Answer
Posted 4 months ago
 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)] Answer
Posted 4 months ago
 Wow! It is exactly what I want to do, thank you. Answer
Posted 4 months ago
 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: 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. Answer