Solving equation in Mathematica

  • Mathematica
  • Thread starter EngWiPy
  • Start date
  • Tags
    Mathematica
In summary, The conversation discusses the use of functions to find solutions for equations. It is mentioned that not all equations have analytical solutions and sometimes numerical solutions must be used. The use of FindRoot is suggested as an alternative to Solve.
  • #1
EngWiPy
1,368
61
Hello,

I have the following code to find the parameters Na and Q that make the expression equals [tex]10^{-10}[/tex]:

Code:
Na =.;
Q =.;
MGF[s_, gC_] := 1/(1 - gC*s);
SNRdB = 0;
SNR = 10^(SNRdB/10);
gC = 0.5*SNR;
p = gA*gB;
A = 23;
Solve[((E^(A/2)*2^-Q)/SNR \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(q = 0\), \(Q\)]\(-
\*SuperscriptBox[\(1\), \(Na + q + 1\)]\)*Binomial[Q, q]*Re[
\*FractionBox[\(MGF[\(-
\*FractionBox[\(A + \((2*Pi*I \((Na + q + 1)\))\)\), \(2\ SNR\)]\), 
          gC]\), 
FractionBox[\(A + 2*Pi*I \((Na + q + 1)\)\), \(2\ SNR\)]]]\)) == 
   10^-10, {Na, Q}]

But it doesn't work? Anyone have any idea about how solving this equation?

Thanks in advance
 
Physics news on Phys.org
  • #2
There are not analytical solutions for all equations. Functions like Solve, Reduce, DSolve, etc. will not always be able to find a solution. In such cases you can only find numerical solutions using e.g. FindRoot.
 
  • #3
DaleSpam said:
There are not analytical solutions for all equations. Functions like Solve, Reduce, DSolve, etc. will not always be able to find a solution. In such cases you can only find numerical solutions using e.g. FindRoot.

Thanks DaleSpam for replying,

So, you are saying that If I replace the "Solve" command by "FindRoot", I may get a result?

Regards
 
  • #4
The syntax for FindRoot is a little different than for Solve. You should use the help menu to find the new syntax and some examples.
 
  • #5
DaleSpam said:
The syntax for FindRoot is a little different than for Solve. You should use the help menu to find the new syntax and some examples.

Ok, I will. Thanks again
 

FAQ: Solving equation in Mathematica

1. How do I input an equation in Mathematica?

To input an equation in Mathematica, you can use the equal sign (=) or the double equal sign (==) as the assignment operator. For example, to input the equation x + 2 = 5, you can use either x+2=5 or x+2==5.

2. Can Mathematica solve any type of equation?

Yes, Mathematica can solve a wide range of equations, including linear, polynomial, trigonometric, exponential, and logarithmic equations. It also has the ability to solve systems of equations and differential equations.

3. How do I solve an equation symbolically in Mathematica?

To solve an equation symbolically in Mathematica, you can use the Solve function. This function takes in the equation and the variable to solve for as arguments. For example, to solve the equation x^2 + 2x - 3 == 0 for x, you can use Solve[x^2 + 2x - 3 == 0, x].

4. How do I solve an equation numerically in Mathematica?

To solve an equation numerically in Mathematica, you can use the NSolve function. This function takes in the equation and the variable to solve for as arguments. For example, to solve the equation x^2 + 2x - 3 == 0 for x, you can use NSolve[x^2 + 2x - 3 == 0, x].

5. Can I plot the solution of an equation in Mathematica?

Yes, you can plot the solution of an equation in Mathematica using the Plot function. This function takes in the equation and the variable to plot as arguments. For example, to plot the solution of the equation x^2 + 2x - 3 == 0, you can use Plot[x^2 + 2x - 3 == 0, x].

Similar threads

Replies
6
Views
2K
Replies
2
Views
438
Replies
11
Views
5K
Replies
2
Views
676
Replies
4
Views
3K
Replies
10
Views
2K
Replies
1
Views
910
Replies
19
Views
996
Back
Top