# Great equation to solve

**URL:** <https://community.wolfram.com/t/great-equation-to-solve/10528>\
**Category:** Questions\
**Tags:** equation-solving\
**Created:** [May 14, 2017, 1:12pm UTC](https://community.wolfram.com/t/great-equation-to-solve/10528 "2017-05-14T13:12:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ovinnikovalexey](https://avatars.discourse-cdn.com/v4/letter/o/a6a055/32.png) [@ovinnikovalexey](https://community.wolfram.com/u/ovinnikovalexey)\
**Post date:** [May 14, 2017, 1:12pm UTC](https://community.wolfram.com/t/great-equation-to-solve/10528/1 "2017-05-14T13:12:04Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![fkampas](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/fkampas/32/41217_2.png) [@fkampas](https://community.wolfram.com/u/fkampas)\
**Post date:** [May 14, 2017, 1:39pm UTC](https://community.wolfram.com/t/great-equation-to-solve/10528/2 "2017-05-14T13:39:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![danl](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/danl/32/41267_2.png) [@danl](https://community.wolfram.com/u/danl)\
**Post date:** [May 14, 2017, 2:51pm UTC](https://community.wolfram.com/t/great-equation-to-solve/10528/3 "2017-05-14T14:51:58Z")

</div>

The Wolfram Language is case sensitive.

---

<div class="post-metadata">

**Author:** ![mariuszi28cg](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mariuszi28cg/32/308_2.png) [@mariuszi28cg](https://community.wolfram.com/u/mariuszi28cg)\
**Post date:** [May 14, 2017, 3:14pm UTC](https://community.wolfram.com/t/great-equation-to-solve/10528/4 "2017-05-14T15:14:51Z")

</div>

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

```

 ![9180Bez tytułu.png](https://global.discourse-cdn.com/wolfram/original/3X/f/9/f9a26911d161ef210c28a5828d3544a302f9387c.png)

for b\in \mathbb{R} is no solution.  
[1]: [http://community.wolfram.com//c/portal/getImageAttachment?filename=9180Bez&nbsp;tytułu.png&userId=476423](http://community.wolfram.com//c/portal/getImageAttachment?filename=9180Bez%C2%A0tytu%C5%82u.png&userId=476423)

---

<div class="post-metadata">

**Author:** ![ovinnikovalexey](https://avatars.discourse-cdn.com/v4/letter/o/a6a055/32.png) [@ovinnikovalexey](https://community.wolfram.com/u/ovinnikovalexey)\
**Post date:** [May 14, 2017, 7:25pm UTC](https://community.wolfram.com/t/great-equation-to-solve/10528/5 "2017-05-14T19:25:19Z")

</div>

This equation evaluates the performance bound on error correcting codes from this paper: [http://www.clemson.edu/sure/projects/jpursley\_secon01.pdf](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?

---

<div class="post-metadata">

**Author:** ![mariuszi28cg](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mariuszi28cg/32/308_2.png) [@mariuszi28cg](https://community.wolfram.com/u/mariuszi28cg)\
**Post date:** [May 14, 2017, 8:13pm UTC](https://community.wolfram.com/t/great-equation-to-solve/10528/6 "2017-05-14T20:13:12Z")

</div>

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

```

 ![6916Bez tytułu.png](https://global.discourse-cdn.com/wolfram/original/3X/7/9/79165c7de82b6c438d2eab13bbea642cdddc457e.png)

```
 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.**

---

<div class="post-metadata">

**Author:** ![ovinnikovalexey](https://avatars.discourse-cdn.com/v4/letter/o/a6a055/32.png) [@ovinnikovalexey](https://community.wolfram.com/u/ovinnikovalexey)\
**Post date:** [May 15, 2017, 10:00am UTC](https://community.wolfram.com/t/great-equation-to-solve/10528/7 "2017-05-15T10:00:29Z")

</div>

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.`

---

<div class="post-metadata">

**Author:** ![wolframcommunity](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/wolframcommunity/32/8335_2.png) [@wolframcommunity](https://community.wolfram.com/u/wolframcommunity)\
**Post date:** [May 15, 2017, 12:04pm UTC](https://community.wolfram.com/t/great-equation-to-solve/10528/8 "2017-05-15T12:04:18Z")

</div>

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](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]

```

 ![ScreenShot2017-04-28at9.43.33AM.png](https://global.discourse-cdn.com/wolfram/original/3X/f/3/f3367c082cbad32b79855f70628ea173f845653e.png)

---

<div class="post-metadata">

**Author:** ![mariuszi28cg](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mariuszi28cg/32/308_2.png) [@mariuszi28cg](https://community.wolfram.com/u/mariuszi28cg)\
**Post date:** [May 15, 2017, 2:48pm UTC](https://community.wolfram.com/t/great-equation-to-solve/10528/9 "2017-05-15T14:48:41Z")

</div>

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"}]

```

 ![eeee.png](https://global.discourse-cdn.com/wolfram/original/3X/5/1/5159bec2fcfbbb38698f606a2b67299a7fc5e12e.png)

Have a nice day **🙂**
