Need an algorithm to calculate a function

Click For Summary
SUMMARY

The discussion centers on calculating a function defined by the equation t + C = (1/2)(x√(1 - x²) + arcsin(x)), with C set to 0.4783 when t=0 and x=1/2. The user reports issues with their implementation, yielding nonsensical results such as a straight line. They explore the use of the simplex method and mention the Newton-Raphson method as an alternative. A proposed solution involves using power series inversion to express t as a power series in a small variable ε, derived from x.

PREREQUISITES
  • Understanding of power series and Taylor series expansions
  • Familiarity with numerical methods, specifically the Newton-Raphson method
  • Knowledge of inverse functions and their properties
  • Proficiency in programming for algorithm implementation
NEXT STEPS
  • Research power series inversion techniques in mathematical analysis
  • Learn about the Newton-Raphson method for solving nonlinear equations
  • Explore Taylor series expansions and their applications in function approximation
  • Investigate numerical methods for solving differential equations
USEFUL FOR

Mathematicians, software developers, and engineers involved in algorithm development, particularly those working with numerical methods and function approximation.

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

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

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 [itex]\epsilon=x-\frac{1}{2}[/itex]
and find the first few Taylor series terms of the right-hand side about [itex]\epsilon=0[/itex]
You have now effectively found t as a power series in [itex]\epsilon[/itex]

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

If you can find the coefficients [itex]a_{i}[/itex] 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 [itex]a_{i}[/itex]

*EDIT:
This requires that [itex]a_{0}=0[/itex].
This, however, holds, since [itex]\epsilon=0[/itex] when t=0.
 
Last edited:
Thanks, arildno. Food for thought.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
19
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
7
Views
2K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K