0
$\begingroup$

I am working on an estimation problem where I have the following

enter image description here

Code is

A = 1 + Pi*Csc[(1 + Pi)*\[Lambda]]^2*
    (Pi + Sin[2*(1 + Pi)*\[Lambda]])

Can anyone help me how can we extract $\lambda$ from this equation in Mathematica?

$\endgroup$
8
  • $\begingroup$ Try : Solve or Reduce ? $\endgroup$ Commented Feb 1, 2021 at 8:18
  • $\begingroup$ @MariuszIwaniuk i want lemda on one side and rest on other side so that I can calculate lemda which is my requirement $\endgroup$ Commented Feb 1, 2021 at 8:25
  • 4
    $\begingroup$ Execute this in Mathematica:Solve[A == 1 + Pi*Csc[(1 + Pi)*\[Lambda]]^2*(Pi + Sin[2*(1 + Pi)*\[Lambda]]), \[Lambda]] then you have the answer? $\endgroup$ Commented Feb 1, 2021 at 8:28
  • 1
    $\begingroup$ You might get a simpler result if there are known constraints on A and/or lambda $\endgroup$
    – Bob Hanlon
    Commented Feb 1, 2021 at 12:56
  • 1
    $\begingroup$ Look at the plot of lambda as a function of A, i.e., ParametricPlot[{1 + Pi*Csc[(1 + Pi)*\[Lambda]]^2*(Pi + Sin[2*(1 + Pi)*\[Lambda]]), \[Lambda]}, {\[Lambda], 0, 2 Pi}, WorkingPrecision -> 15, AspectRatio -> 1, Frame -> True, FrameLabel -> {"A", "\[Lambda]"}] $\endgroup$
    – Bob Hanlon
    Commented Feb 1, 2021 at 13:15

1 Answer 1

1
$\begingroup$

Help Solve with TrigExpand.

Function is periodic, lets find period.

A[\[Lambda]_] = 1 + Pi*Csc[(1 + Pi)*\[Lambda]]^2*
   (Pi + Sin[2*(1 + Pi)*\[Lambda]])

Plot[A[\[Lambda]], {\[Lambda], 0, 3}]

\[Lambda]period = 
   lap /. First@
Solve[0 < lap < 1 && A[1/2] - A[1/2 + lap] == 0 && 
  A[1/2] - A[1/2 + 2 lap] == 0 // TrigExpand, lap]

(*   (-1 + 3*Pi - 
  4*ArcTan[Sec[1/2]*Sqrt[Cos[1/2]^2 + Sin[1/2]^2] - 
        Tan[1/2]])/(2 + 2*Pi)   *)

\[Lambda]sol[AA_] = \[Lambda] /. Solve[TrigExpand[
     0 < \[Lambda] < 2*\[Lambda]period && 
 A[\[Lambda]] == AA], \[Lambda], Reals]

(*   {ConditionalExpression[
 (2*Pi + 2*ArcTan[Root[Pi^2 + 4*Pi*#1 + 
                (4 - 4*AA + 2*Pi^2)*#1^2 - 4*Pi*#1^3 + 
                Pi^2*#1^4 & , 1]])/(1 + Pi), 
 Element[ArcTan[Root[Pi^2 + 4*Pi*#1 + 
             (4 - 4*AA + 2*Pi^2)*#1^2 - 4*Pi*#1^3 + 
             Pi^2*#1^4 & , 1]], Reals] && AA > Pi^2], 
ConditionalExpression[
 (2*Pi + 2*ArcTan[Root[Pi^2 + 4*Pi*#1 + 
                (4 - 4*AA + 2*Pi^2)*#1^2 - 4*Pi*#1^3 + 
                Pi^2*#1^4 & , 2]])/(1 + Pi), 
 Element[ArcTan[Root[Pi^2 + 4*Pi*#1 + 
             (4 - 4*AA + 2*Pi^2)*#1^2 - 4*Pi*#1^3 + 
             Pi^2*#1^4 & , 2]], Reals] && AA > Pi^2], 
ConditionalExpression[
 (2*ArcTan[Root[Pi^2 + 4*Pi*#1 + (4 - 4*AA + 2*Pi^2)*
                #1^2 - 4*Pi*#1^3 + Pi^2*#1^4 & , 3]])/(1 + Pi), 
 Element[ArcTan[Root[Pi^2 + 4*Pi*#1 + 
             (4 - 4*AA + 2*Pi^2)*#1^2 - 4*Pi*#1^3 + 
             Pi^2*#1^4 & , 3]], Reals] && AA > Pi^2], 
ConditionalExpression[
 (2*ArcTan[Root[Pi^2 + 4*Pi*#1 + (4 - 4*AA + 2*Pi^2)*
                #1^2 - 4*Pi*#1^3 + Pi^2*#1^4 & , 4]])/(1 + Pi), 
 Element[ArcTan[Root[Pi^2 + 4*Pi*#1 + 
             (4 - 4*AA + 2*Pi^2)*#1^2 - 4*Pi*#1^3 + 
             Pi^2*#1^4 & , 4]], Reals] && AA > Pi^2]}   *)

pl1 = Plot[Evaluate[\[Lambda]sol[AA]], {AA, 0, 200}, 
 PlotRange -> All, PlotStyle -> {Green, Red, Orange, 
     Magenta}]

pl2 = ParametricPlot[Evaluate[{A[\[Lambda]], \[Lambda]}], 
 {\[Lambda], 0, 3}, AspectRatio -> 1]

Show[pl2, pl1]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.