Title: | Mathematics at DEC |
Moderator: | RUSURE::EDP |
Created: | Mon Feb 03 1986 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 2083 |
Total number of notes: | 14613 |
I NEED HELP IN SOLVING THE FOLLOWING FOR 'F'. ANY ASSISTANCE WOULD BE APPRECIATED. 1/SQRTF = 2LOG10(XSQRTF)-0.8 F = ?????????? THANKS... MARC
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
1525.1 | What's XSQRTF? | ELIS::GARSON | V+F = E+2 | Mon Nov 25 1991 02:56 | 0 |
1525.2 | SALEM::ARSENAULT | Mon Nov 25 1991 07:30 | 9 | ||
(XSQRTF) X is a variable SQRT F is the square root of F X * SQRTF multiply X by SQRTF Marc | |||||
1525.3 | Can't be done? | HERON::BLOMBERG | Trapped inside the universe | Mon Nov 25 1991 11:29 | 7 |
I don't think there is any explicit solution expressed with a finite number of elementary functions. If you write y=1/sqrt(f) you get y + 2*log(y) = 2*log(x) - 0.8 and I don't see how to solve that. | |||||
1525.4 | Sort of. | CADSYS::COOPER | Topher Cooper | Mon Nov 25 1991 13:21 | 13 |
Maple provides a partial solution to the equation in .3: W(1/2 ln(10) exp(ln(x) - 2/5 ln(10))) y = 2 ------------------------------------- ln(10) W is a special function designed for solving problems like this which is defined to be "the function satisfying W(x) * exp(W(x)) = x". Fast numerical routines can be designed for finding the value of W for various arguments (which are used by Maple). Topher | |||||
1525.5 | One for Newton-Raphson! | BRSTR2::SYSMAN | Dirk Van de moortel | Tue Nov 26 1991 05:13 | 54 |
Re .0 What happened to good old Newton-Raphson and BASIC? Here is a small VAX-BASIC program that gives you an 'f' for every 'x' you want (not smaller than 1!) It converges very quickly (at most 7 iterations) Try it... if you don't have a BASIC compiler at hand, I'll copy the object and/or executable to your account... PROGRAM SOLVE !====================================================================== ! Newton-Raphson: ! ! f(y) ! y = y - ----- ! n+1 n f'(y) ! ! where y = 1/sqrt(f) ! f(y) = y + 2*log10(y) - 2*log10(x) + 0.8 ! ! when y and y come together, you have a solution for the ! n n+1 ! ! equation f(y) = 0, which is what you're looking for. ! !====================================================================== option type = real, size = real double ln10 = log(10) input "x [quit=0]"; x while x >= 1 lx2 = 2 * log10(x) ! remember this y = 1 ! start value diff = 100 ! start difference iter = 0 ! iteration number print ,"Iter","Diff" print ,"----","----" while (diff > .0000001) and (iter < 1000) y_next = y - ( y+2*log10(y)-lx2+0.8 ) / & ( 1 + 2/(y*ln10) ) diff = abs(y_next-y) y = y_next iter = iter + 1 print ,iter,diff next f = 1/(y*y) ! that's it print "Result: f =",f,bel check = 1/sqrt(f) - 2*log10(x*sqrt(f)) + 0.8 print "Check: Left term - Right term ="; check input "x [quit=0]"; x next END | |||||
1525.6 | SALEM::ARSENAULT | Wed Nov 27 1991 09:40 | 4 | ||
THANKS FOR YOUR HELP. I LATER FOUND OUT THAT THERE IS NO WAY OF ISOLATING 'F'. I DEVELOPED A FORTRAN ROUTINE THAT SOLVE IT. MARC |