Skip to main content

functions - Solving $L=frac{3}{2} sqrt{4 pi ^2 A^2+W^2}-frac{sqrt{5 W sqrt{4 pi ^2 A^2+W^2}+6 pi ^2 A^2+3 W^2}}{sqrt{2}}+frac{3 W}{2}$ for $W$


When I solve the aforementioned equation for $W$ or $A$ on Mathematica I get a long and ugly equation in return, namely one of the solutions for $W$ is: (attempt to read at your own health)


Solve[L == (3 W)/2 + (3 Sqrt[4 A^2 Pi^2 + W^2])/2 - Sqrt[6 A^2 Pi^2 + 3 W^2 +
5 W Sqrt[4 A^2 Pi^2 + W^2]]/Sqrt[2], W]

$W=\frac{3 L}{10}-\frac{1}{2} \sqrt{\frac{\sqrt[3]{-243200 \pi ^6 A^6+176832 L^2 \pi ^4 A^4+3600 L^4 \pi ^2 A^2+2160 L^6+\sqrt{-7962624000 \pi ^{12} A^{12}-8626176000 L^2 \pi ^{10} A^{10}+717410304 L^4 \pi ^8 A^8+3308138496 L^6 \pi ^6 A^6+911879424 L^8 \pi ^4 A^4+17252352 L^{10} \pi ^2 A^2+4672512 L^{12}}}}{15 \sqrt[3]{2}}+\frac{9 L^2}{25}-\frac{4}{15} \left(10 \pi ^2 A^2+3 L^2\right)+\frac{4 \sqrt[3]{2} \left(640 \pi ^4 A^4-246 L^2 \pi ^2 A^2-3 L^4\right)}{15 \sqrt[3]{-243200 \pi ^6 A^6+176832 L^2 \pi ^4 A^4+3600 L^4 \pi ^2 A^2+2160 L^6+\sqrt{-7962624000 \pi ^{12} A^{12}-8626176000 L^2 \pi ^{10} A^{10}+717410304 L^4 \pi ^8 A^8+3308138496 L^6 \pi ^6 A^6+911879424 L^8 \pi ^4 A^4+17252352 L^{10} \pi ^2 A^2+4672512 L^{12}}}}}-\frac{1}{2} \sqrt{-\frac{\sqrt[3]{-243200 \pi ^6 A^6+176832 L^2 \pi ^4 A^4+3600 L^4 \pi ^2 A^2+2160 L^6+\sqrt{-7962624000 \pi ^{12} A^{12}-8626176000 L^2 \pi ^{10} A^{10}+717410304 L^4 \pi ^8 A^8+3308138496 L^6 \pi ^6 A^6+911879424 L^8 \pi ^4 A^4+17252352 L^{10} \pi ^2 A^2+4672512 L^{12}}}}{15 \sqrt[3]{2}}+\frac{18 L^2}{25}-\frac{8}{15} \left(10 \pi ^2 A^2+3 L^2\right)-\frac{4 \sqrt[3]{2} \left(640 \pi ^4 A^4-246 L^2 \pi ^2 A^2-3 L^4\right)}{15 \sqrt[3]{-243200 \pi ^6 A^6+176832 L^2 \pi ^4 A^4+3600 L^4 \pi ^2 A^2+2160 L^6+\sqrt{-7962624000 \pi ^{12} A^{12}-8626176000 L^2 \pi ^{10} A^{10}+717410304 L^4 \pi ^8 A^8+3308138496 L^6 \pi ^6 A^6+911879424 L^8 \pi ^4 A^4+17252352 L^{10} \pi ^2 A^2+4672512 L^{12}}}}-\frac{\frac{216 L^3}{125}-\frac{48}{25} \left(10 \pi ^2 A^2+3 L^2\right) L+\frac{48}{5} \left(L^2-2 A^2 \pi ^2\right) L}{4 \sqrt{\frac{\sqrt[3]{-243200 \pi ^6 A^6+176832 L^2 \pi ^4 A^4+3600 L^4 \pi ^2 A^2+2160 L^6+\sqrt{-7962624000 \pi ^{12} A^{12}-8626176000 L^2 \pi ^{10} A^{10}+717410304 L^4 \pi ^8 A^8+3308138496 L^6 \pi ^6 A^6+911879424 L^8 \pi ^4 A^4+17252352 L^{10} \pi ^2 A^2+4672512 L^{12}}}}{15 \sqrt[3]{2}}+\frac{9 L^2}{25}-\frac{4}{15} \left(10 \pi ^2 A^2+3 L^2\right)+\frac{4 \sqrt[3]{2} \left(640 \pi ^4 A^4-246 L^2 \pi ^2 A^2-3 L^4\right)}{15 \sqrt[3]{-243200 \pi ^6 A^6+176832 L^2 \pi ^4 A^4+3600 L^4 \pi ^2 A^2+2160 L^6+\sqrt{-7962624000 \pi ^{12} A^{12}-8626176000 L^2 \pi ^{10} A^{10}+717410304 L^4 \pi ^8 A^8+3308138496 L^6 \pi ^6 A^6+911879424 L^8 \pi ^4 A^4+17252352 L^{10} \pi ^2 A^2+4672512 L^{12}}}}}}}$


The above just makes the point that the solution can't be written by hand (or by mine at least).


So my question is, can I represent the solution using an easily-written function of $A$ and $L$ (for instance, as a infinite summation)?



Answer



It seems me that the answers of mathe and Yves Klett do not meet expectations of the author. The latter is as much as I have got it, to have a short analytical expression for the solution. Probably the author has an intention to use the result further in some analytical calculations, or to do something comparable. Am I right?



If yes, one should first of all be clear that what is already found is the exact solution, which is what it is. If you need the exact solution, you can only try to somewhat simplify it, as Yves Klett did, and after the simplification is done, that's it.


Another story, if you agree to have an approximate solution, which is expressed by a simple analytical formula. In that case I can contribute as follows. Here is your equation:


eq1 = L == (3 W)/2 + (3 Sqrt[4 A^2 Pi^2 + W^2])/2 -Sqrt[6 A^2
Pi^2 + 3 W^2 + 5 W Sqrt[4 A^2 Pi^2 + W^2]]/Sqrt[2]

First let us simplify a bit your equation by changing variables:


 eq2 = Simplify[
eq1 /. {W -> 2 \[Pi]*A*x, L -> 2 \[Pi]*A*u}, {x > 0, A > 0}]

(* 3 (x + Sqrt[1 + x^2]) == 2 u + Sqrt[3 + 6 x^2 + 10 x Sqrt[1 + x^2]] *)


Now let us consider the variable xas a new unknown and u as a parameter and solve with respect to x.


slX = Solve[eq2, x];

Its solutions are still too cumbersome. For this reason I do not give them below. One can make sure that there are four of them:


 slX // Length

(* 4 *)

And visualize them



    Plot[{slX[[1, 1, 2]], slX[[2, 1, 2]], slX[[3, 1, 2]], 
slX[[4, 1, 2]]}, {u, 0, 4}, PlotStyle -> {Red, Blue, Green, Brown}]

giving the following: enter image description here


Now one can approximate any of these solutions by some simple function. I will give the example with the first solution. First let us make a list out of it:


    lst = Select[Table[{u, slX[[1, 1, 2]]}, {u, 0.6, 1, 0.003}], 
Im[#[[2]]] == 0 &];

Second, let us approximate it by a simple model:


model = a + b/(c + u);

ff = FindFit[lst, model, {a, b, {c, -0.63}}, u]
Show[{
ListPlot[lst, Frame -> True,
FrameLabel -> {Style["u", 16, Italic], Style["x", 16, Italic]}],
Plot[model /. ff, {u, 0.63, 1}, PlotStyle -> Red]
}]

The outcome is the values of the model parameters:


(*    {a -> -0.418378, b -> 0.0290875, c -> -0.549429}   *)


and the plot enabling one to visually estimate the quality of the approximation:


enter image description here


Here the blue points come from the list, and the solid red line - from the approximation. Have fun!


Comments

Popular posts from this blog

front end - keyboard shortcut to invoke Insert new matrix

I frequently need to type in some matrices, and the menu command Insert > Table/Matrix > New... allows matrices with lines drawn between columns and rows, which is very helpful. I would like to make a keyboard shortcut for it, but cannot find the relevant frontend token command (4209405) for it. Since the FullForm[] and InputForm[] of matrices with lines drawn between rows and columns is the same as those without lines, it's hard to do this via 3rd party system-wide text expanders (e.g. autohotkey or atext on mac). How does one assign a keyboard shortcut for the menu item Insert > Table/Matrix > New... , preferably using only mathematica? Thanks! Answer In the MenuSetup.tr (for linux located in the $InstallationDirectory/SystemFiles/FrontEnd/TextResources/X/ directory), I changed the line MenuItem["&New...", "CreateGridBoxDialog"] to read MenuItem["&New...", "CreateGridBoxDialog", MenuKey["m", Modifiers-...

How to thread a list

I have data in format data = {{a1, a2}, {b1, b2}, {c1, c2}, {d1, d2}} Tableform: I want to thread it to : tdata = {{{a1, b1}, {a2, b2}}, {{a1, c1}, {a2, c2}}, {{a1, d1}, {a2, d2}}} Tableform: And I would like to do better then pseudofunction[n_] := Transpose[{data2[[1]], data2[[n]]}]; SetAttributes[pseudofunction, Listable]; Range[2, 4] // pseudofunction Here is my benchmark data, where data3 is normal sample of real data. data3 = Drop[ExcelWorkBook[[Column1 ;; Column4]], None, 1]; data2 = {a #, b #, c #, d #} & /@ Range[1, 10^5]; data = RandomReal[{0, 1}, {10^6, 4}]; Here is my benchmark code kptnw[list_] := Transpose[{Table[First@#, {Length@# - 1}], Rest@#}, {3, 1, 2}] &@list kptnw2[list_] := Transpose[{ConstantArray[First@#, Length@# - 1], Rest@#}, {3, 1, 2}] &@list OleksandrR[list_] := Flatten[Outer[List, List@First[list], Rest[list], 1], {{2}, {1, 4}}] paradox2[list_] := Partition[Riffle[list[[1]], #], 2] & /@ Drop[list, 1] RM[list_] := FoldList[Transpose[{First@li...

dynamic - How can I make a clickable ArrayPlot that returns input?

I would like to create a dynamic ArrayPlot so that the rectangles, when clicked, provide the input. Can I use ArrayPlot for this? Or is there something else I should have to use? Answer ArrayPlot is much more than just a simple array like Grid : it represents a ranged 2D dataset, and its visualization can be finetuned by options like DataReversed and DataRange . These features make it quite complicated to reproduce the same layout and order with Grid . Here I offer AnnotatedArrayPlot which comes in handy when your dataset is more than just a flat 2D array. The dynamic interface allows highlighting individual cells and possibly interacting with them. AnnotatedArrayPlot works the same way as ArrayPlot and accepts the same options plus Enabled , HighlightCoordinates , HighlightStyle and HighlightElementFunction . data = {{Missing["HasSomeMoreData"], GrayLevel[ 1], {RGBColor[0, 1, 1], RGBColor[0, 0, 1], GrayLevel[1]}, RGBColor[0, 1, 0]}, {GrayLevel[0], GrayLevel...