MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Iterative solution to a transcendental equation.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125056] Re: Iterative solution to a transcendental equation.
  • From: Tomas Garza <tgarza10 at msn.com>
  • Date: Mon, 20 Feb 2012 02:45:41 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201202191130.GAA15610@smc.vnet.net>

Hi,
On first sight I notice you have some errors of syntax: ln should be written Log, and the exponential function should be written as Exp. Second, there is a problem with the transcription of your formulas from Mathematica into email. For example, I read fn[w]:=-a ln[w] =96 w + 1 + b [1 - e^(-alpha x[[i]])] , and I don't know the meaning of the =96. Other than that, I think the answer can be obtained without any hitch. If you let me know what is =96 (surely some symbol) and any value of x I can try my hand.
-Tomas 

> Date: Sun, 19 Feb 2012 06:30:05 -0500
> From: peter.livingston at cox.net
> Subject: Iterative solution to a transcendental equation.
> To: mathgroup at smc.vnet.net
>
> Thank you for having the informative website, that as a new user,  I am
> enjoying.
>
>
>
> I am in the process or porting over into MATHEMATICA a long program that
> describes non-linear processes in optical fiber amplifiers=97an area of my
> specialty.
>
>
>
> There is a transcendental equation in this long program that, written in
> dimensionless form, shows the amplified signal in the cladding-pumped fiber.
> The particular snippet of code is in a nb file (I prefer to use the nb as a
> front end), but I transcribe it below.  As you shall see, this equation is
> unlike the examples in the manual, and I have not found any =91handle=92 on how
> to approach it.
>
>
>
> 1.       Divide the fiber length L into Mmax =150 steps
>
> X = Table[1-i/Mmax,{i,Mmax}];
>
> X = L N[x];
>
>
>
> 2.       For every interval x[[i]], find the root w of this expression. (I
> chose a single value for x just to see if the method would work.   It
> didn't.  But when it does, I want to operate on the whole row vector
> produced by Table, element by element.
>
> fn[w]:=-a ln[w] =96 w + 1 + b [1 - e^(-alpha x[[i]])]
>
> The constant a is 0.4, the constant b is 90 and the constant alpha is 0.53
>
> The root w is  number that is always greater than or equal to 1. (It is the
> ratio of the signal power in the fiber amplifier to the input signal power.)
>
>
>
> 3.       The construct I used is
>
> Soln=NSolve[fn[w]==0,w]
>
> Reduce[Soln]  --Note I have also tried FindRoot with similar bafflement.
>
>
>
> 4.       For my efforts I got several semi-intelligible error messages
>
> SetDelayed::write: Tag _Plus_ in _(1-w+0.09 1000[0.783204]-(2 log[w])/5)[w]_
> is Protected.
> <http://reference.wolfram.com/mathematica/ref/message/General/write.html> =87
>
> NSolve::ifun: Inverse functions are being used by _NSolve_, so some
> solutions may not be found; use Reduce for complete solution information.
> <http://reference.wolfram.com/mathematica/ref/NSolve.html> =87
>
> Reduce::naqs: _{w=AEInverseFunction[1-w+0.09 1000[0.783204]-(2
> log[w])/5,1,1][0.]}_ is not a quantified system of equations and
> inequalities.
> <http://reference.wolfram.com/mathematica/ref/message/Reduce/naqs.html> =87
>
>
>
> Needless to say, I am baffled.  It appears that coming from a progressive
> computing background, I know how to iteratively solve the equation.  I can
> do it in about 10 steps on a pocket calculator.  And I kow how to write do
> loops.  However, I believed that the power of MATHEMATICA was such that I
> should expect the kernel to figure out how to iteratively solve the
> transcendental equation.
>
>
>
> By the way, how do you get the kernel to spit out numbers with all of the
> arithmetic done, not just sums of products and such.
>
>
>
> Incidentally, while the =91bible=92=97Mathematics and Algorithms =97is absolutely
> essential, it could use an index and a few more illustrations.
>
>
>
> Thanks for your time.  Am looking forward to your reply.
>
>
>
> Peter Livingston


  • Prev by Date: Re: Equation solving problem
  • Next by Date: Re: Reading Single and Double reals in Little-endian and Big-endian
  • Previous by thread: Iterative solution to a transcendental equation.
  • Next by thread: Re: Iterative solution to a transcendental equation.