Re: Doubt about formula transcription
- From: e p chandler <epc8@xxxxxxxx>
- Date: Sun, 4 May 2008 19:30:52 -0700 (PDT)
On Apr 7, 3:36 pm, Leonardo Marques <surf...@xxxxxxxxx> wrote:
hey guys,
im with a little problem when im transcripting a mathformulafrom
maple to fortran, because when i put a solution on the equation, i got
a result diferent from zero.
Theformulais: 2*arctan(sin(a)*cos(a)/(.8-cos(a)^2))-4/9*Pi ;
I've transcripted to fortran as: 2*atan((sin(a)*cos(a))/(0.8-
cos(a)**2))-((pi)*4/9)
[code snipped]
Your equation has closed form solutions.
let gamma=(2pi)/9
1. invert the equation
2. apply formulas for sin(2x) and cos(2x)
sin(2a) sin(gamma)
---------- = tan(gamma) = ----------
.6-cos(2a) cos(gamma)
3. cross multiply and simplify
sin(2a) cos(gamma) + cos(2a) sin(gamma) = .6 sin(gamma)
4. apply formula for sin(A+B)
sin(2a+gamma) = .6 sin(gamma)
5. let beta = arcsine(.6 sin(gamma))
note that sin(x) = sin(pi-x)
2x + gamma = beta
pi - (2y + gamma) = beta
solve for principal solutions x and y
= (beta-gamma)/2 and (pi-beta-gamma)/2
[other solutions can of course be obtained by adding or subtracting
multiples of 2pi above.]
- e
.
- Follow-Ups:
- Re: Doubt about formula transcription
- From: glen herrmannsfeldt
- Re: Doubt about formula transcription
- Prev by Date: Re: Standard input
- Next by Date: Re: deepening into fortran 90,95, 2003
- Previous by thread: Treacherous Behavior of "gfortran" Compiler?
- Next by thread: Re: Doubt about formula transcription
- Index(es):
Relevant Pages
|