My Math Forum  

Go Back   My Math Forum > High School Math Forum > Pre-Calculus

Pre-Calculus Pre-Calculus Math Forum


Reply
 
LinkBack Thread Tools Display Modes
November 28th, 2017, 10:33 AM   #1
Newbie
 
Joined: Feb 2012
From: Central Florida

Posts: 8
Thanks: 0

Inverse Function question

I'm retired and write computer programs as a hobby.

I'm not up on calculus, only had algebra & trig years ago. But I've written a computer program to calc the sin of an angle using the (I think) Taylor series. Anyhow it works as I checked my answers with online calcs.

Now I want to write a program to find the arcsin which would be the inverse.

I've searched and see a lot of number formulas that don't give me the logistics to write code with.

Trying to find the inverse function of

sin(x) = x - x^n/n! + x^n/n! - x^n/n! +.... -infinity < x < infinity
or if it makes it simplier,
sin(x) = x - x^3/6 + x^5/120 - x^7/5040

I.e. I need the inverse of the above with something that would allow me to see how the denominator is figured in the inverse function. Cause some of the inverse samples I've seen don't seem to all be factorials of n.

Can anybody help with this?
R_W_B is offline  
 
November 28th, 2017, 10:37 AM   #2
Senior Member
 
romsek's Avatar
 
Joined: Sep 2015
From: USA

Posts: 1,652
Thanks: 838

$\arctan(x) = \sum \limits_{k=0}^\infty~(-1)^k \dfrac{x^{2k+1}}{2k+1}$
romsek is online now  
November 28th, 2017, 04:47 PM   #3
Newbie
 
Joined: Feb 2012
From: Central Florida

Posts: 8
Thanks: 0

Quote:
Originally Posted by romsek View Post
$\arctan(x) = \sum \limits_{k=0}^\infty~(-1)^k \dfrac{x^{2k+1}}{2k+1}$
Thanks for that, but I'm not smart enough to integrate (or expand ) that into something I can write code from. I did look around and find this,
d/dx(sin-1x) 1/SqRt of 1-x^2
sin-1x = integral symbol
= (1-x^2)^1/2 dx + c (constant)
= 1 + x^2/2 + 3x^4/8 + 5x^6/16 + ... + c
= x + 1/2 * x^3/3 + 1/2 * 3/4 * x^5/5 + 1/2 * 3/4 * 5/6 * x^7/7 + ... + c
with sin-1 = 0 at x =0 =>C = 0
sin-1x would then =
x + 1/2 * x^3/3 + 1/2 * 3/4 * x^5/5 + 1/2 * 3/4 * 5/6 * x^7/7 + ...,|x| < 1

And it obviously is expanded (integrated ?) and the exponet values seem to increment by 2 but I don't really understand how they arrived at the denominators. Do I have to learn calculus to understand this or can it be said in simple terms ?
R_W_B is offline  
November 28th, 2017, 05:10 PM   #4
Senior Member
 
romsek's Avatar
 
Joined: Sep 2015
From: USA

Posts: 1,652
Thanks: 838

it's just

$\arctan(x) = x - \dfrac {x^3}{3} + \dfrac{x^5}{5} - \dfrac{x^7}{7} + \dots$
romsek is online now  
November 29th, 2017, 09:58 AM   #5
Newbie
 
Joined: Feb 2012
From: Central Florida

Posts: 8
Thanks: 0

Quote:
Originally Posted by romsek View Post
it's just

$\arctan(x) = x - \dfrac {x^3}{3} + \dfrac{x^5}{5} - \dfrac{x^7}{7} + \dots$
Thanks!, but uh well I still need a bit of help. I just now realized that's the arctan(x) instead of the arcsin(x). I originally asked for the inverse of the sin(x).

Is the arctan(x) the inverse of the sin(x) ?

But running with what you gave could you please give me some input on your 1st reply inverse function depiction. I.e. does the (-1)k multiply the entire (x^2k + 1 / 2k+1) ?
as in (-1)k * (x^2k + 1 / 2k+1) (I don't know how to print symbols like you had it)

When looking at depictions I've seen of function expressions, the parts are placed so close. But I assume it's the same as regular algebra expressions when there is no . (dot) or multiplication symbol it's assumed multiplication, correct ?

Also if you would be so kind, could you show me the steps you did to expand that function? It might help me grasp some of the concept in function depictions.
R_W_B is offline  
November 29th, 2017, 10:19 AM   #6
Senior Member
 
romsek's Avatar
 
Joined: Sep 2015
From: USA

Posts: 1,652
Thanks: 838

Quote:
Originally Posted by R_W_B View Post
Thanks!, but uh well I still need a bit of help. I just now realized that's the arctan(x) instead of the arcsin(x). I originally asked for the inverse of the sin(x).
oh, I don't know why I read that as arctan().

$\arcsin(x)$ has a fairly complicated series

$\arcsin(x) = \sum \limits_{n=0}^\infty~\dfrac{(2n)!}{2^{2n}(n!)^2(2n +1)}x^{2n+1}$

You can view a derivation here if you like.
romsek is online now  
November 29th, 2017, 03:39 PM   #7
Newbie
 
Joined: Feb 2012
From: Central Florida

Posts: 8
Thanks: 0

Quote:
Originally Posted by romsek View Post
oh, I don't know why I read that as arctan().

$\arcsin(x)$ has a fairly complicated series

$\arcsin(x) = \sum \limits_{n=0}^\infty~\dfrac{(2n)!}{2^{2n}(n!)^2(2n +1)}x^{2n+1}$

You can view a derivation here if you like.
Thanks! You've been a big help to me in the decipher of this paradigm. Which is really more what my interest is since my programming compiler's lib has inbuilt routines that will return sin(x) and ArcSin(sin). It's the theory behind it that intriques me to write the base code. I will watch that link's video also to try to educate myself more on the factoring & solving of the expansions.

To wrap up this thread could you tell me if I've understood the above function premise with what I've written below.

{for summation infinity to n=0}
(2n)! / ( 2^(2n) * (n!)^2 * (2n +1) ) * x^(2n+1)

Last edited by R_W_B; November 29th, 2017 at 03:39 PM. Reason: correction
R_W_B is offline  
November 29th, 2017, 05:00 PM   #8
Senior Member
 
Joined: Feb 2016
From: Australia

Posts: 1,453
Thanks: 489

Math Focus: Yet to find out.
Quote:
Originally Posted by R_W_B View Post

{for summation infinity to n=0}
(2n)! / ( 2^(2n) * (n!)^2 * (2n +1) ) * x^(2n+1)
A for loop is basically a summation. Instead of 'summing from n=0 to infinity' we can say 'for n=0 to infinity'. Of course, you can't sum to infinity on your computer!

Your compiler will need to know what ^ and ! mean.

Also, I can't tell if you want to express the series symbolically, or actually evaluate the function manually with a series? A symbolic expression can become a bit tedious in some environments.

If just want to approximate the function then you can easily calculate all the terms individually and store them in an array, then add them together. All this depends on what software you using however.

M = 1000; // Make this number bigger/smaller and
// compare with functions true value
x = 3; // The number to evaluate your function at
f_val = 0;
for n=1 to M
f_temp(n) = [[(2n)! / (2^(2n)*(n!)^2 *(2n +1))] * x^(2n+1)]; // Stores each term in f_temp.
f_val = f_val + f_temp(n); //Add the terms together.
end
Joppy is online now  
November 30th, 2017, 07:33 AM   #9
Newbie
 
Joined: Feb 2012
From: Central Florida

Posts: 8
Thanks: 0

Quote:
Originally Posted by romsek View Post
$\arcsin(x) = \sum \limits_{n=0}^\infty~\dfrac{(2n)!}{2^{2n}(n!)^2(2n +1)}x^{2n+1}$
Quote:
Originally Posted by Joppy View Post
A for loop is basically a summation. Instead of 'summing from n=0 to infinity' we can say 'for n=0 to infinity'. Of course, you can't sum to infinity on your computer!

Your compiler will need to know what ^ and ! mean.

Also, I can't tell if you want to express the series symbolically, or actually evaluate the function manually with a series? A symbolic expression can become a bit tedious in some environments. . . . . . . . . . . . . . . . . .
. . . . . . . . . . .
Thanks, my compiler will use the ^ for intergal exponents, for floating point nums it uses pow(x,y). I've written my own function for Factorials (!) as that is pretty straight forward to decipher. And thanks for the routine help.

But you lost me a bit on your function symbolic expression answer. Basically what I am fishing for is in the function depictions (like the one shown above by romsek) does the last X^(2n+1) tacked onto the right side multiply by the previous part of the function depiction (or expression) ?

I.e. is it similar to any other algebra expression that does not give a dot or any other operator. The reason I'm asking is that it's placed (in most graphic depictions) so close, right up against the previous part of the function expression with no space at all. Just looks a bit ambiguous to a new to calculus person like me.

Any elaboration of input you have would be appreciated.
R_W_B is offline  
Reply

  My Math Forum > High School Math Forum > Pre-Calculus

Tags
function, inverse, question



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inverse function of a differentiable function WWRtelescoping Calculus 2 September 2nd, 2014 05:57 AM
Find all linear function given a function equals its inverse deSitter Algebra 4 April 10th, 2013 02:17 PM
Inverse trigonometric function question razzatazz Trigonometry 12 March 6th, 2013 12:08 AM
Inverse of a continuous function is continuoust, a question annakar Calculus 3 January 11th, 2013 07:07 AM
find inverse of inverse function jaredbeach Algebra 1 November 17th, 2011 12:58 PM





Copyright © 2017 My Math Forum. All rights reserved.