Message Boards Message Boards

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

Great equation to solve

Posted 7 years ago

I try to solve equation in Mathematica 11:

Solve[1 - Integrate[exp[0.5 (x - b)^2] log2[exp[-2 b*x] + 1], {x, -5, 20}]/(sqrt[2*pi] log[2]) == 0, b] 

by have a error

Solve::inex: Solve was unable to solve the system with inexact coefficients or the system obtained by direct rationalization of inexact numbers present in the system.

Since many of the methods used by Solve require exact input, providing Solve with an exact version of the system may help. What should I do to correct it?

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: Moderation Team

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

This equation evaluates the performance bound on error correcting codes from this paper: http://www.clemson.edu/sure/projects/jpursley_secon01.pdf (in the attachment) Equation (1), (6) and Figure 4 : Capacity of the Binary-Input Channel. Mariusz Iwaniuk, your result is far away from the Figure 4 plot. Are there any other way to calcucate equation?

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

Changing the 0.5 to 1/2 will get rid of the inexact number message. However, when you do that you'll get a message that Solve can't handle the problem.

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

Group Abstract Group Abstract