jsquilumbaquin
(Jairo Smith Quilumbaquin Lanchimba)
July 24, 2021, 6:37pm
1
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?
[1]: 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
[3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=F_3.png&userId=2304918
hdolhaine
(Hans Dolhaine)
July 24, 2021, 10:51pm
2
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)]
jsquilumbaquin
(Jairo Smith Quilumbaquin Lanchimba)
July 25, 2021, 5:36pm
3
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.
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=F_4.png&userId=2304918
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
hdolhaine
(Hans Dolhaine)
July 25, 2021, 10:59pm
5
For printing (only) purposes you may write
bb /. four -> "4"
hdolhaine
(Hans Dolhaine)
July 25, 2021, 11:52pm
6
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)]
jsquilumbaquin
(Jairo Smith Quilumbaquin Lanchimba)
July 26, 2021, 12:39am
7
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.
jsquilumbaquin
(Jairo Smith Quilumbaquin Lanchimba)
July 26, 2021, 12:42am
8
Wow! It is exactly what I want to do, thank you.