2
$\begingroup$

I've the following code:

LogLinearPlot[
 20 Log10[(5/
      Sqrt[2])*(1/(\[Sqrt]((8 f \[Pi] 56000 (5.601443110900379`*^-8) \
- 8 (1.6672176431702952`*^-7) f^3 \[Pi]^3 56000^3 \
(5.601443110900379`*^-8)^2)^2 + (1 - 
            8 f^2 \[Pi]^2 56000^2 (5.601443110900379`*^-8) \
((1.6672176431702952`*^-7) + (5.601443110900379`*^-8)))^2)))], {f, 
  0.01, 1000}]

It is a logarithmic plot of a electronic filter.

Now, I want to get some asymptotic lines in my plot. So at the beginning of the plot my code produces a straight line at $20\log_{10}(5/\sqrt{2})$ and further it dies asymptotic off to $-\infty$ but I want to have a dotted asymptotic line to give that in the plot.

Something like this:

enter image description here

The red line I got in my function and I want the blue lines that asymptoticly give my values in the plot.

$\endgroup$
4
$\begingroup$
func[f_] := 
 20 Log10[(5/
      Sqrt[2])*(1/(\[Sqrt]((8 f \[Pi] 56000 (5.601443110900379`*^-8) \
- 8 (1.6672176431702952`*^-7) f^3 \[Pi]^3 56000^3 \
(5.601443110900379`*^-8)^2)^2 + (1 - 
             8 f^2 \[Pi]^2 56000^2 (5.601443110900379`*^-8) \
((1.6672176431702952`*^-7) + (5.601443110900379`*^-8)))^2)))]

Finding the asymptotic lines:

Horizontal asymptote:

a1=Limit[func[x], x -> 0]

10.9691

Oblique asymptote:

m = Limit[func[x]/Log[x], x -> \[Infinity]]
q = Limit[func[x] - m*Log[x], x -> \[Infinity]]

-26.0577

103.815

Plot:

Show[LogLinearPlot[func[x], {x, 0.01, 10000}
  , PlotStyle -> Red
  , Frame -> True
  , GridLines -> Automatic
  , Axes -> True
  , AxesOrigin -> {1, 0}
  ]
 ,
 Plot[a1, {x, 0.01, 10000}
  , PlotStyle -> {Blue, Dotted}]
 ,
 Plot[m*x + q, {x, 0.01, 10000}
  , PlotStyle -> {Blue, Dotted}
  ]
 ]

enter image description here

$\endgroup$
  • $\begingroup$ How can I make the blue lines dotted? $\endgroup$ – asd Jun 8 '18 at 13:50
  • $\begingroup$ With the option "Dotted" in PlotStyle: see edit in my answer $\endgroup$ – Fraccalo Jun 8 '18 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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