# Graphing a function with an internal transcendental equation

this is my first post here and I am newer at Mathemtaica, so be easy on me. I have a transcendental equation that keeps crashing Mathematica or producing {{}}when I attempt to solve it.

Here is my simplified formula:

a = (6.821 10^23 + 4.446 10^11 z)/(1.057 10^11 + 0.101 z);
b = (4.971*10^23 + 9.793*10^11 1 z)/(1.057*10^11 + 0.1010 z);
z := (x/(9.84 10^13 (b - 2 a))) (Exp[4.92*10^-13 ((b - 2 a) 4)] - 1)

y = 12.083 ((5.186 10^10 z)/(1.057 10^11 + 0.101 z) - (1.459 10^12)/(
1.0570 10^11 + 1.111 z));


y[x_] is the formula I want to be able to plot.

I've searched SE for similar problems and it seems like I should be using FindRoot or NSolve

So

NSolve[z == 0, {z}]


Gives:$RecursionLimit::reclim: Recursion depth of 1024 exceeded and FindRoot[z == 0, {z, 0}]  Crashes Mathematica. Any help would be very much appreciated. Thanks for your time. • a and b depend on z, but then in your third line z depends again on a and b. Are you sure, these are the right expressions? – Mauricio Fernández Nov 8 '16 at 16:03 • You have$a(z)$,$b(z)$,$z(a,b,x)$and$y(z)$. How do you suppose to solve$z(z)$? – m0nhawk Nov 8 '16 at 16:03 • Once a and b are inserted into z, z becomes z(x,z). Then z(x,z) goes into y(z). Producing a y(x,z). – Siggi Nov 8 '16 at 16:07 • Yeah, but you can't define things this way, because Mathematica will keep updating the values, because each of your a, b, z, and y all have definitions. Instead, maybe try replacement rules. But I don't understand your last comment: You want to plot y[x], but y is a function of both x and y. Is it that you want to plot y as a function of x for z = 0? – march Nov 8 '16 at 16:19 • z(x,z) doesn't make sense. Maybe try giving in plain terms what you are trying to calculate. – Feyre Nov 8 '16 at 16:27 ## 1 Answer So, the big numbers are kind of a problem, but you can try this. First, in order to eliminate the recursion error, define an equation eq for the implicit definition of$z(x)$or$x(z)$a = (6.821 10^23 + 4.446 10^11 z)/(1.057 10^11 + 0.101 z); b = (4.971*10^23 + 9.793*10^11 1 z)/(1.057*10^11 + 0.1010 z); eq = (x/(9.84 10^13 (b - 2 a))) (Exp[4.92*10^-13 ((b - 2 a) 4)] - 1) - z == 0; y = 12.083 ((5.186 10^10 z)/(1.057 10^11 + 0.101 z) - (1.459 10^12)/(1.0570 10^11 + 1.111 z));  Now, the equation eq sadly can not be solved with Mathematica in respect to z in order to obtain$z(x)$. But it can easily be solved in respect to x and you can take a look at it for varying z xsol = x /. Solve[eq, x][]; Plot[xsol, {z, -10, 10}] As you can see, for your case, around$z = 0$it seems to be a linear relation. So, let's take the first-order Taylor approximation, invert it, and then with$z_1(x)$go into$y(z)$and get$y_1(x)$as you wanted (for an approximation). This is what you get for$y_1(x)\$

xsol1 = Normal[Series[xsol, {z, 0, 1}]];
zsol1 = z /. Solve[xsol1 == x, z][];
ysol1 = y /. z -> zsol1;
Plot[ysol1, {x, -10^20, 10^20}] 