cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

problem with root finding

alainstgt
1-Newbie

problem with root finding

Hello everybody,

I have encountered a problem in finding a root with a function containing an if-statement.
I have found a work around, but my original approach is much more elegant. Furthermore, I do not understand the error message since all functions or variables are defined.
Help or at least a comment why the system is complaining this error would me much appreciated.

Thanks for your time.
Alain
16 REPLIES 16

Nothing to do with the if function (although that can introduce discontinuities that prevent roots algorithms from working). You problem is simply that Dχ is a function, and you cannot do arithmetic on it.
__________________
� � � � Tom Gutman

Since the conflict is with the formal argument name of Dχ it can be resolved by changing its name.
__________________
� � � � Tom Gutman

Thanks Tom!

Your root is a bit monkey business, like this: if the butter is in the pan, where is the butter ... just a bit too circular. Whatever you want to solve for, you must solve for something, something that you omitted to specify !



jmG

... something I don't understand in there ?



"In physics, the speed of light (usually denoted c) is a physical constant, the speed at which electromagnetic radiation, such as light, travels in free space (i.e., perfect vacuum). Its value is 299,792,458 metres per second"

jmG

... this function resembles strangely Lambert W(x).
Would you dare a data reduction and look at it ?

jmG

On 10/23/2009 2:08:20 AM, jmG wrote:
>... this function resembles
>strangely Lambert W(x).
>Would you dare a data
>reduction and look at it ?
>
>jmG
___________________________

... the ratio D(x)/W(x) looks like the "Rate equation" ?
If it would verifies sufficiently well, then:
"The result is too beautiful not to be true" [Dirac].

Consider or ignore.

jmG



On 10/23/2009 2:13:19 AM, jmG wrote:
>On 10/23/2009 2:08:20 AM, jmG wrote:
>>... this function resembles
>>strangely Lambert W(x).
>>Would you dare a data
>>reduction and look at it ?
>>
>>jmG
>___________________________
>
>... the ratio D(x)/W(x) looks like the
>"Rate equation" ?
>If it would verifies sufficiently well,
>then:
>"The result is too beautiful not to be
>true" [Dirac].
>
>Consider or ignore.
>
>jmG
>_____________________

You must understand my suggestion, not suggesting to zap the all lot, no: if your physics is correct and D(x) de facto, OK. But at D(x), it would make sense saying: "all the derived matters above can be defined in term of a functionally scaled Lambert D(x)".

jmG



Jean, could you please post again your document in version 2000?
Thanks in advance

On 10/23/2009 9:40:52 AM, alainstgt wrote:
>Jean, could you please post
>again your document in version
>2000?
>Thanks in advance
_______________________________

I couldn't find quick the relationship with Lambert W(x). Dkapa(z) fits nicely with a rational approximation, this one is not attached. There is a very good agreement between the derivative of Dkapa(z) and Pearson VII, the fit is given. I CAN'T get the integral of Pearson VII, my symbolic is dead, and I don't know how to fix it or repair, RegTool did nothing, I'm afraid the cure is an Uninstall/Reinstall, and get it registered ... But no idea who is going to register , PTC (I have no contract) or a virtual former Mathsoft magic register ?

I hope some of my best "collab friends" will catch my desperate situation and come up with the appropriate doctoring. I will survive numeric only for the day.

The residuals are "relative residuals".

Jean

PS: Oh ! Mona, what to do with my dead 11.2a symbolic.
I have no gun to shot myself !



Thank you all ... my 11.2a symbolic is back !

Jean

On 10/23/2009 9:40:52 AM, alainstgt wrote:
>Jean, could you please post
>again your document in version
>2000?
>Thanks in advance
_______________________________

The other question, mostly important,
what is the range of 'z' in Dkappa(z) ?
In R0, no need || under the SQRT symbol.
what's under the QRT is a positive number.
What about a light/s = 1 as a smaller unit system ?

Jean



Jean, the || under the square root is necessary, since Omega0 can be greater than 1!
If you take a look to the first published data of WMAP, you�ll find that Omega0 = 1.003

For the remainder, the solution is, as Tom has suggested, to rename the variable Dx and to use the root finding algorithm, which works well in that case!

On 10/23/2009 6:49:15 PM, alainstgt wrote:
>Jean, the || under the square
>root is necessary, since
>Omega0 can be greater than 1!
>If you take a look to the
>first published data of WMAP,
>you�ll find that Omega0 =
>1.003

==> I trust you on that .

>For the remainder, the
>solution is, as Tom has
>suggested, to rename the
>variable Dx and to use the
>root finding algorithm, which
>works well in that case!

==> No problem to solve on the run on a dummy variable, XX(1535) does nothing. Solving on the run is attached but watch your incorrect call. The culprit is that often the continuous root is not possible if the solver needs be seeded. I have quite a few examples reputed "not solvable" even by Mathematica. For those difficult solving, you can use the seeded root scanner, it runs like a bomb and has never failed. I'm not saying YET the project is such a case. The advantage of the seeded root solver is that you have a data table, that can be exported, linearly interpolated on very low level pocket calculator. You can spline and have a continuous function analytical to the 2nd order derivative, or better in this project: the root scanner is approximated by a TCF [Thiele Continued Fraction]. The project as such, suffers some scaling that you might want to reconsider, i.e: speed of light and Hubble. Your approach does not meet the literature wrt the scaling . The other limiting aspect is the numerical maths. The project is asymptotic, and like all those of this sort, the numerical solvers fail. Here, everything is slow because the recompute of the integrals starting at 0 on each cycle. If you have questions, please repost this work sheet with the presumed appropriate scaling... you just have an extra term vs Wikipeia, but your does not read/match either Wiki or other materials I have consulted. A diagram/picture (more than one) and an introductory tutorial would help this project to be of great interest in the "Age of the Universe" [Hubble project]. You should in fact rename your work sheet "Hubble Project" [suggestion].

Jean




to Jean:
I have taken a deeper look, and you are right concerning the ill conditioned function. I have overseen this aspect, because I am using the value in km/s/Mpc (Mpc = Mega Parsec) in my original document which is not so small! I just needed the function to get the equivalent in radial distances when reading values of photometric distances in the literature! I have now plotted the function and was surprised how many "holes" they were.
The best way to scale the function is to scale with H100/c, were H100 has the value of 100 km/s/Mpc, so that the coefficient c/H0 gets 1/h0 with h0 = H0 / H100.
This leads to the expected result over the full range.
Concerning YOUR project Hubble Project, I have a document of 195 pages about it! surely too much to discuss in a forum.

>to Jean:
I have taken a deeper look, and you are right concerning the ill conditioned function. I have overseen this aspect, because I am using the value in km/s/Mpc (Mpc = Mega Parsec) in my original document which is not so small! ...<<br> _______________________

True Alain, not so small !

I'm sure you will have a way of scaling down in terms of the related physics. Because of the limit in the asymptotic region of Dkappa(z) and not knowing either the range of (z, there may be a supplementary technique to extend the root solver. But we have to wait for your more elaborate version of the Hubble project. At least you seem to know what you are doing with that piece of physics.
Thanks, very educative.

Jean
Top Tags