Need an algorithm to calculate a function

Mentz114
Messages
5,429
Reaction score
292
I'm trying to calculate a table of x vs t, with x as the dependent variable from
this formula

t + C = \frac{1}{2}(x\sqrt( 1 - x^2) + arcsin(x) )

C=0.4783 is given when t=0 and x = 1/2

I thought it would be simple but my code is giving nonsensical results, viz.
a straight line ! I do get the correct answer when t =0 (1/2) and I can't find a fault in my code. My code also gives a straight line for

t = arcsin(x) + 0.5 which obviously wrong, since x = sin( t - 1/2).

Has anyone got a general algorithm for this ? I'm using simplex but I
haven't tried Newton-Ralphson

This is related to the 'Interesting Oscillator Potential' topic below.
 
Last edited:
Physics news on Phys.org
You might use power series inversion:
1. Introduce the "tiny" variable \epsilon=x-\frac{1}{2}
and find the first few Taylor series terms of the right-hand side about \epsilon=0
You have now effectively found t as a power series in \epsilon

2. Assume that this power series is invertible, i.e, it exists a function:
\epsilon(t)=\sum_{i=0}^{\infty}a_{i}t^{i}

If you can find the coefficients a_{i} you're finished! :smile:

3.Insert this power series on the epsilon places, and collect terms of equal power in t. (For each finite power of t, only a finite number of terms need to be collected.*)

4. Different powers of t are linearly independent functions, hence all coefficients of the powers must equal zero. This demand of zeroes furnishes you with the equations to determine the coefficients a_{i}

*EDIT:
This requires that a_{0}=0.
This, however, holds, since \epsilon=0 when t=0.
 
Last edited:
Thanks, arildno. Food for thought.
 
Hello everyone, I’m considering a point charge q that oscillates harmonically about the origin along the z-axis, e.g. $$z_{q}(t)= A\sin(wt)$$ In a strongly simplified / quasi-instantaneous approximation I ignore retardation and take the electric field at the position ##r=(x,y,z)## simply to be the “Coulomb field at the charge’s instantaneous position”: $$E(r,t)=\frac{q}{4\pi\varepsilon_{0}}\frac{r-r_{q}(t)}{||r-r_{q}(t)||^{3}}$$ with $$r_{q}(t)=(0,0,z_{q}(t))$$ (I’m aware this isn’t...
Hi, I had an exam and I completely messed up a problem. Especially one part which was necessary for the rest of the problem. Basically, I have a wormhole metric: $$(ds)^2 = -(dt)^2 + (dr)^2 + (r^2 + b^2)( (d\theta)^2 + sin^2 \theta (d\phi)^2 )$$ Where ##b=1## with an orbit only in the equatorial plane. We also know from the question that the orbit must satisfy this relationship: $$\varepsilon = \frac{1}{2} (\frac{dr}{d\tau})^2 + V_{eff}(r)$$ Ultimately, I was tasked to find the initial...
Back
Top