Can this equation be numerically solved using online resources or Matlab code?

  • Thread starter Thread starter ColdFusion85
  • Start date Start date
Click For Summary

Homework Help Overview

The discussion revolves around the numerical solution of a specific equation involving exponential and rational expressions. Participants are exploring methods to simplify and reformulate the equation for numerical solving, particularly using Matlab or online resources.

Discussion Character

  • Exploratory, Mathematical reasoning, Problem interpretation, Assumption checking

Approaches and Questions Raised

  • Participants discuss simplifying the right-hand side of the equation and reformulating it into a cubic equation. There are attempts to clarify the nature of the equation and the implications of certain values for x. Questions arise regarding the correctness of simplifications and the approach to finding roots.

Discussion Status

The discussion is active, with participants providing insights on simplification techniques and the structure of the equation. Some guidance has been offered on how to approach the problem, particularly in terms of identifying poles and ensuring the correct formulation for numerical methods.

Contextual Notes

Participants note the importance of avoiding problematic values for x and emphasize the need to simplify expressions correctly before applying numerical methods. There is an acknowledgment of the original poster's limited programming experience, which may affect their approach to solving the equation.

ColdFusion85
Messages
141
Reaction score
0
I need to use a program to numerically solve the following equation:

[tex]exp(-2.222)=\frac{(\frac{2x}{2+2x})^2(\frac{x}{2+2x})}{(\frac{2-x}{2+2x})^2}[/tex]

I tried using Matlab to solve it but I kept on getting an error message. I'm not a programmer or familiar with these numerical solvers at all. Is there some place online I can solve this equation, or can someone post the Matlab code to solve it? The code is not part of the homework, but I arrived at the above equation and need to solve it in order to finalize my answer, so if anyone could help me solve it that would be great. Thanks.
 
Physics news on Phys.org
Well, you can simplify the right-hand side quite a bit. Ultimately you can turn it into a cubic equation for x.
 
First, simplify the expression. Then reformulate it in the form [itex]f(x)=0[/itex].

You now have something amenable to the zero finding functions.

[itex]x=2[/itex] and [itex]x=-1[/itex] are obviously problematic. You want to find a pair of [itex]x[/itex] values [itex]x_1[/itex] and [itex]x_2[/itex] such that neither of the poles is between [itex]x_1[/itex] and [itex]x_2[/itex] and such that [itex]f(x_1)[/itex] and [itex]f(x_2)[/itex] have opposite signs. There is a zero between these points.
 
Last edited:
Avodyne said:
Well, you can simplify the right-hand side quite a bit. Ultimately you can turn it into a cubic equation for x.

Not quite that much. You get a rational polynomial, a simple cubic divided by a quadratic.

EDIT: I worked to much today.

Ultimately, you're right. Simplifying the RHS leads to [itex]p(x)/q(x)-c=0[/itex] where [itex]p(x)[/itex]is cubic and [itex]q(x)[/itex] is quadratic. Multiplying by [itex]q(x)[/itex] yields [itex]p(x)-cq(x)=0[/itex], a cubic.
 
Last edited:
For the RHS I expanded everything out and got this:

[tex]\frac{4x^3(4x^2+8x+4)}{(8x^3+24x^2+24x+8)(x^2-4x+4)}[/tex]

Is this correct?
 
Don't expand! Get rid of the common factor instead. Look at the numerator and denominator.
 
Oh, ok so one gets:

[tex]\frac{4x^3}{(2-x)^2(2+2x)}[/tex]?
 
Yes. You can also get rid of a factor of two. And oops, I said cubic/quadratic. What you have is a ratio of two cubics, which is correct. Now multiply through by the denominator to get a cubic equation (valid so long as x is not 2 or -1).
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
1K
Replies
4
Views
2K
Replies
5
Views
2K
Replies
7
Views
2K
Replies
10
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
7
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K