Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.4K Views
|
8 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Great equation to solve

Posted 9 years ago
8 Replies

Mariusz Iwaniuk, thanks for help. I apologize for the mistake committed by me. I'm doing my first steps in Mathematica. I try to plot figure from function:

1-NIntegrate[Exp[-1/2*(y - Sqrt[2*ebn0*R])^2]*Log[2, Exp[-2*Sqrt[2*ebn0*R]*y] + 1], {y, -5, 20}, Method -> "LobattoKronrodRule"]/(Sqrt[2*Pi]*Log[2])) == R;

I need to plot ebn0(R), but I don't know how can I do this. This plot should be equivalent to Figure 4 : Capacity of the Binary-Input Channel.`

Welcome to Wolfram Community! Please make sure you know the rules and how to format your code properly, which you can find here: https://wolfr.am/READ-1ST If you do not format code, it may become corrupted and useless to other members. Please EDIT your posts and make sure code blocks start on a new paragraph and look framed and colored like this.

int = Integrate[1/(x^3 - 1), x];
Map[Framed, int, Infinity]

enter image description here

POSTED BY: EDITORIAL BOARD

I had to remove $log(2)$ from the denominator from equation and I must to replace the expression $Eb/N0$ with $10^{\text{Eb/N0}/10}$ in order for the plot to be correct .

     Int2[R_?NumericQ, ebNo_?NumericQ] := NIntegrate[Exp[-1/2*(y - Sqrt[2*ebNo*R])^2] 
     Log[2, Exp[-2*Sqrt[2*ebNo*R]*y] + 1], {y, -Infinity, Infinity}, Method -> "LobattoKronrodRule"];

     ContourPlot[R == 1 - Int2[R, 10^(ebNo/10)]/Sqrt[2*Pi], {R, 0.001, 1}, {ebNo, -2, 10}, Axes -> True, 
     GridLines -> {Table[n, {n, 0, 1, 0.1}], Table[n, {n, -2, 10, 2}]}, ContourStyle -> {Black, Thick}, 
     FrameTicks -> {{All, None}, {Table[n, {n, 0, 1, 0.1}], None}}, FrameLabel -> {"R", "Eb/N0"}]

enter image description here Have a nice day :)

POSTED BY: Mariusz Iwaniuk
Attachments:

You did a mistakes in $e^{\frac{1}{2} (y-b)^2}$,it should be:$e^{-\frac{1}{2} (y-b)^2}$

Int[b_?NumericQ] := NIntegrate[Exp[-1/2*(y - b)^2]*Log[2, Exp[-2*b*y] + 1], {y, -5, 20}, Method -> "LobattoKronrodRule"];
ListPlot[Table[{b, (1 - Int[b]/(Sqrt[2*Pi]*Log[2]))}, {b, -3, 3, 1/10}], Joined -> True,PlotLegends -> {"eq(b)"}] // Quiet

enter image description here

 FindRoot[(1 - Int[b]/(Sqrt[2*Pi]*Log[2])) == 0, {b, 7/10}, WorkingPrecision -> 20]
 (*{b -> 0.73171520950283916124}*)
 FindRoot[(1 - Int[b]/(Sqrt[2*Pi]*Log[2])) == 0, {b, -7/10}, WorkingPrecision -> 20]
 (*{b -> -0.73171520950283916124}*)

Next time give us a correct equation.

POSTED BY: Mariusz Iwaniuk

You did a lot syntax mistakes, it should be:

Solve[1 - Integrate[Exp[1/2*(x - b)^2]*Log[2, Exp[-2*b*x] + 1], {x, -5, 20}]/(Sqrt[2*Pi]*Log[2]) == 0, b]

but MMA can't find symbolic solution to this integral:

Integrate[Exp[1/2*(x - b)^2]*Log[2, Exp[-2*b*x] + 1], {x, -5, 20}]

You may find it numerically:

 Int[b_?NumericQ] := NIntegrate[Exp[1/2*(x - b)^2]*Log[2, Exp[-2*b*x] + 1], {x, -5, 20}, Method -> "LobattoKronrodRule"];

and plot equation:

 ListLogLogPlot[Table[{b, -(1 - Int[b]/(Sqrt[2 Pi]*Log[2]))}, {b, -2, 10, 1/1000}], Joined -> True] // Quiet

enter image description here

for $b\in \mathbb{R}$ is no solution.

POSTED BY: Mariusz Iwaniuk

The Wolfram Language is case sensitive.

POSTED BY: Daniel Lichtblau
POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard