vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Community Lounge (https://vborg.vbsupport.ru/forumdisplay.php?f=13)
-   -   Math Question (https://vborg.vbsupport.ru/showthread.php?t=116609)

lightnb 05-25-2006 02:03 AM

Math Question
 
IF

Code:

A = 2(TAN(F*F))
How do you re-write the formula to solve for F?

peterska2 05-25-2006 02:10 AM

so

A = 2(TAN(F Squared)

A = Tan(F squared) + Tan (F squared)

A/Tan = (f squared) + (f squared)

A/Tan = 2(f squared)

A/(2 Tan) = F squared

square root (A/(2 tan)) = F

Could be wrong, coz it's a long while since I last did algebra though.

Freesteyelz 05-25-2006 02:30 AM

*Sigh* I feel so inadequate. :lick:

Adrian Schneider 05-25-2006 02:44 AM

F = squareroot(inversetan(a/2);

My work:
Code:

a = 2tan(F*F);
a/2 = tan(F*F);
iTan(a/2) = F*F
2root(iTan(a/2)) = F;


Xenium 05-25-2006 10:00 AM

Me too.. F = SQUAREROOT(INVERSETAN(A/2))

@peterska2. The inverse of TAN is INVERSETAN not divide tan:p

Code:

A = 2(TAN(F*F))
A = 2(TAN(F^2))
A/2 = TAN(F^2)
INVERSETAN(A/2) = F^2
F = SQUAREROOT(INVERSETAN(a/2))


peterska2 05-25-2006 11:08 AM

I knew it was probably wrong, but it's a long while since I last did algebra.

lightnb 05-25-2006 11:28 AM

Thanks guys :)

I was never too good at algebra...

is inverse tangent the same as arc tangent?

in other words, would:

PHP Code:

$F SQRT(atan($A/2)); 

be the correct PHP syntax for this?

Xenium 05-25-2006 02:13 PM

Yes. Arc tan is the inverse of tan for php.

But the return is in radians. So if you want it in degrees, you will need to use rad2deg.


E.G.

PHP Code:

$F SQRT(rad2deg(atan($A/2))); 


lightnb 05-25-2006 10:32 PM

$A should be in degrees. $f should be a decimal

who is chris c 05-25-2006 11:21 PM

just a fyi you cant divide normal trig fnct (sin, cos, tan) by both sides like normal you need to take the inverse (^-1) to do the equalitive property been awhile but thought i'd throw that in

Xenium 05-26-2006 05:28 AM

Quote:

Originally Posted by who is chris c
just a fyi you cant divide normal trig fnct (sin, cos, tan) by both sides like normal you need to take the inverse (^-1) to do the equalitive property been awhile but thought i'd throw that in

Didn't we already work that out? :confused:

Adrian Schneider 05-26-2006 05:34 AM

Quote:

Originally Posted by Xenium
Me too.. F = SQUAREROOT(INVERSETAN(A/2))

@peterska2. The inverse of TAN is INVERSETAN not divide tan:p

Code:

A = 2(TAN(F*F))
A = 2(TAN(F^2))
A/2 = TAN(F^2)
INVERSETAN(A/2) = F^2
F = SQUAREROOT(INVERSETAN(a/2))


Didn't we already work that out? LOL just kidding :)

I wish our calculators were as easy to program with as PHP, it would have made math class so much easier...

lightnb 05-26-2006 02:13 PM

I'm using:

$FA = sqrt(rad2deg(atan($MFh/2)));

and getting '3.56' as the answer when $MFh is set to .45.

I should be getting "36 degrees". I think the decimal place may be off?

lightnb 05-29-2006 09:27 PM

My other equation isn't working right either...

I have the two variables, and depending on which one the user gives, it should solve for the other. but it seems that the answers don't work the other way:

for example if I set $FA and get an answer for $MFh, then use that answer to solve for $FA again, the answer i get isn't the number I started with.

the two equations are:

PHP Code:

$MFh=2*(tan($FA*$FA)); 

and

PHP Code:

$FA sqrt(rad2deg(atan($MFh/2))); 

any ideas?

lightnb 05-31-2006 01:42 AM

I guess this has gone from a general math question, to a PHP syntax issue. Should it be moved to a different forum?

Paul M 05-31-2006 01:57 AM

AFAIK, in php both TAN and ATAN work in radians, so using rad2deg will screw up the answer.

lightnb 05-31-2006 02:43 AM

Quote:

Originally Posted by Paul M
AFAIK, in php both TAN and ATAN work in radians, so using rad2deg will screw up the answer.


What should it be then? if $MF needs to be a decimal, and $FA is in degrees?


All times are GMT. The time now is 04:55 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01319 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (17)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete