# How can I Rationalize this?

**URL:** <https://community.wolfram.com/t/how-can-i-rationalize-this/18593>\
**Category:** Questions\
**Tags:** algebra, equation-solving, symbolic-computations\
**Created:** [July 24, 2021, 6:37pm UTC](https://community.wolfram.com/t/how-can-i-rationalize-this/18593 "2021-07-24T18:37:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsquilumbaquin](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@jsquilumbaquin](https://community.wolfram.com/u/jsquilumbaquin)\
**Post date:** [July 24, 2021, 6:37pm UTC](https://community.wolfram.com/t/how-can-i-rationalize-this/18593/1 "2021-07-24T18:37:58Z")

</div>

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

 ![F_1.png](https://global.discourse-cdn.com/wolfram/original/3X/4/a/4a6f42b3fc8fb99c14876c1bb03f2cdccd4cd0c0.png)

it results from resolve this:

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

```

it give me this:

![F_2.png](https://global.discourse-cdn.com/wolfram/original/2X/5/59e3387ef4ef838095f34663b0a02076d35409ad.png)

and this what I was trying:

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

```

![F_3.png](https://global.discourse-cdn.com/wolfram/original/3X/d/6/d62e79a859ac841d9b724148332a640a654bbd43.png)

how can I introduce the “2L” expression on to the root?  
[1]: [https://community.wolfram.com//c/portal/getImageAttachment?filename=F\_1.png&userId=2304918](https://community.wolfram.com//c/portal/getImageAttachment?filename=F_1.png&userId=2304918)  
[2]: [https://community.wolfram.com//c/portal/getImageAttachment?filename=F\_2.png&userId=2304918](https://community.wolfram.com//c/portal/getImageAttachment?filename=F_2.png&userId=2304918)  
[3]: [https://community.wolfram.com//c/portal/getImageAttachment?filename=F\_3.png&userId=2304918](https://community.wolfram.com//c/portal/getImageAttachment?filename=F_3.png&userId=2304918)

---

<div class="post-metadata">

**Author:** ![hdolhaine](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/hdolhaine/32/35924_2.png) [@hdolhaine](https://community.wolfram.com/u/hdolhaine)\
**Post date:** [July 24, 2021, 10:51pm UTC](https://community.wolfram.com/t/how-can-i-rationalize-this/18593/2 "2021-07-24T22:51:42Z")

</div>

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)]

```

---

<div class="post-metadata">

**Author:** ![jsquilumbaquin](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@jsquilumbaquin](https://community.wolfram.com/u/jsquilumbaquin)\
**Post date:** [July 25, 2021, 5:36pm UTC](https://community.wolfram.com/t/how-can-i-rationalize-this/18593/3 "2021-07-25T17:36:39Z")

</div>

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:

![F_4.png](https://global.discourse-cdn.com/wolfram/original/3X/7/a/7ae24f53087b1818eaa7664b7c724c49ab683785.png)

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.  
[1]: [https://community.wolfram.com//c/portal/getImageAttachment?filename=F\_4.png&userId=2304918](https://community.wolfram.com//c/portal/getImageAttachment?filename=F_4.png&userId=2304918)

---

<div class="post-metadata">

**Author:** ![anon21378091](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@anon21378091](https://community.wolfram.com/u/anon21378091)\
**Post date:** [July 25, 2021, 10:42pm UTC](https://community.wolfram.com/t/how-can-i-rationalize-this/18593/4 "2021-07-25T22:42:29Z")

</div>

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

```

---

<div class="post-metadata">

**Author:** ![hdolhaine](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/hdolhaine/32/35924_2.png) [@hdolhaine](https://community.wolfram.com/u/hdolhaine)\
**Post date:** [July 25, 2021, 10:59pm UTC](https://community.wolfram.com/t/how-can-i-rationalize-this/18593/5 "2021-07-25T22:59:26Z")

</div>

For printing (only) purposes you may write

```
bb /. four -> "4"

```

---

<div class="post-metadata">

**Author:** ![hdolhaine](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/hdolhaine/32/35924_2.png) [@hdolhaine](https://community.wolfram.com/u/hdolhaine)\
**Post date:** [July 25, 2021, 11:52pm UTC](https://community.wolfram.com/t/how-can-i-rationalize-this/18593/6 "2021-07-25T23:52:29Z")

</div>

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)]

```

---

<div class="post-metadata">

**Author:** ![jsquilumbaquin](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@jsquilumbaquin](https://community.wolfram.com/u/jsquilumbaquin)\
**Post date:** [July 26, 2021, 12:39am UTC](https://community.wolfram.com/t/how-can-i-rationalize-this/18593/7 "2021-07-26T00:39:13Z")

</div>

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:

![F_5.png](https://global.discourse-cdn.com/wolfram/original/3X/4/5/45156f725027bf89afe13634af858835d8356c38.png)

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.

---

<div class="post-metadata">

**Author:** ![jsquilumbaquin](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@jsquilumbaquin](https://community.wolfram.com/u/jsquilumbaquin)\
**Post date:** [July 26, 2021, 12:42am UTC](https://community.wolfram.com/t/how-can-i-rationalize-this/18593/8 "2021-07-26T00:42:59Z")

</div>

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