Author Topic: math  (Read 1001 times)

mabdelouahab

  • Member
  • ***
  • Posts: 398
math
« on: September 26, 2018, 11:10:16 PM »
I need math help
How can I demonstrate mathematically on the following equation:
√(2+√(3)) *√(2)* (√(3) - 1)=2
sqrt(2+sqrt(3)) *sqrt(2)* (sqrt(3) -1)=2

HSE

  • Member
  • ****
  • Posts: 890
  • <AMD>< 7-32>
Re: math
« Reply #1 on: September 27, 2018, 12:50:46 AM »
Code: [Select]
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
    include \masm32\include\masm32rt.inc
    .686
    .XMM
    include \masm32\macros\SmplMath2\Math.inc
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
comment * -----------------------------------------------------
                     Build this console app with
                  "MAKEIT.BAT" on the PROJECT menu.
        ----------------------------------------------------- *

    .data?
      value dd ?

    .data
      item dd 0

    .code
start:
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
    call main
    inkey
    exit
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
main proc
    local demo : real8

    fSlv8 demo = (2+(3)^0.5)^0.5 *(2)^0.5 * ((3)^0.5 - 1)   
    cls
    print real8$(demo),13,10
    ret
main endp

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

end start
Code: [Select]
2.000000
Press any key to continue ...

RuiLoureiro

  • Member
  • ****
  • Posts: 819
Re: math
« Reply #2 on: September 27, 2018, 04:46:11 AM »
I need math help
How can I demonstrate mathematically on the following equation:
√(2+√(3)) *√(2)* (√(3) - 1)=2
sqrt(2+sqrt(3)) *sqrt(2)* (sqrt(3) -1)=2
Hi  :biggrin:
       sqrt(2+sqrt(3)) *sqrt(2)* (sqrt(3) -1)=2

=> (sqrt(2+sqrt(3)))^2 * (sqrt(3) -1)^2=4/2

<=> (2+sqrt(3)) * (sqrt(3) -1)^2=2

<=> (2+sqrt(3)) * (3+1-2*sqrt(3))=2

<=> (2+sqrt(3)) * (2-sqrt(3))=2/2               here (a+b)*(a-b)=a^2-b^2     for any a,b

<=> (2^2 - sqrt(3)^2) = 1

<=> (4 - 3) = 1

<=> 1 = 1
is done
 :t
« Last Edit: September 27, 2018, 07:09:09 AM by RuiLoureiro »

mabdelouahab

  • Member
  • ***
  • Posts: 398
Re: math
« Reply #3 on: September 27, 2018, 04:58:38 AM »
Wow!, Thank you RuiLoureiro  :t


FORTRANS

  • Member
  • *****
  • Posts: 1036
Re: math
« Reply #4 on: September 27, 2018, 05:34:01 AM »
Hi,

   Well, even though I was not first, since I typed it in.

<Google search>

The latter can be solved by the formula:

 sqrt {a + sqrt{b} } = sqrt{ {a + sqrt{a^2 - b}} over2} +
                       sqrt{ {a - sqrt{a^2 - b}} over2}
</Google search>

So:

sqrt( 2 + sqrt(3) ) = sqrt( ( 2 + sqrt(2^2 - 3) )/ 2 ) +
                      sqrt( ( 2 - sqrt(2^2 - 3) )/ 2 )

                    = sqrt( ( 2 + sqrt(1) ) / 2 ) + sqrt( ( 2 - sqrt(1) ) / 2 )
                    = sqrt( ( 3 ) / 2 ) + sqrt( ( 1  ) / 2 )
                    = sqrt( 3 / 2 ) + sqrt( 1 / 2 )
                    = ( sqrt( 3 ) + 1 ) / sqrt( 2 )

For the original equqtion;
sqrt( 2 + sqrt(3) ) * sqrt(2) * ( sqrt(3) - 1 ) = 2

then becomes;
( sqrt(3) + 1 ) / sqrt(2) * sqrt(2) * ( sqrt(3) - 1 ) = 2

Center terms cancel:
( sqrt(3) + 1 ) * ( sqrt(3) - 1 ) = 2
sqrt(3)^2 - 1 = 2
 3 - 1 = 2

HTH,

Steve N.

mabdelouahab

  • Member
  • ***
  • Posts: 398
Re: math
« Reply #5 on: September 27, 2018, 06:15:24 AM »

The latter can be solved by the formula:

 sqrt {a + sqrt{b} } = sqrt{ {a + sqrt{a^2 - b}} over2} +
                       sqrt{ {a - sqrt{a^2 - b}} over2}
Thank you Steve N  :t, today I learned a formula

RuiLoureiro

  • Member
  • ****
  • Posts: 819
Re: math
« Reply #6 on: September 27, 2018, 06:24:31 AM »

The latter can be solved by the formula:

 sqrt {a + sqrt{b} } = sqrt{ {a + sqrt{a^2 - b}} over2} +
                       sqrt{ {a - sqrt{a^2 - b}} over2}
Thank you Steve N  :t , today I learned a formula
Hi,
 now ... you need to demonstrate this formula :biggrin:

Raistlin

  • Member
  • ***
  • Posts: 407
Re: math
« Reply #7 on: September 27, 2018, 11:20:13 PM »
Sorry guys. Being a math illeilliterate and then
Aspergers and Adhd I don't get it.....

Are we talking precedence of math functions or
how to do a square root in ASM ?  I seem to
remember some wicked code for integer square
root that sizzled the proverbial toes.
{Sent from cellphone sorry for formatting errors}
« Last Edit: September 28, 2018, 02:28:55 AM by Raistlin »
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...

K_F

  • Member
  • *****
  • Posts: 1429
  • Anybody out there?
Re: math
« Reply #8 on: September 27, 2018, 11:37:17 PM »
I get this... after a bottle of red late at night. ;)

'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

mabdelouahab

  • Member
  • ***
  • Posts: 398
Re: math
« Reply #9 on: September 28, 2018, 04:17:37 AM »
hi K_F
In the first line:
√(2 + √(3)) *√(2)* (√(3) - 1)=2
not:
√(2 * √(3)) *√(2)* (√(3) - 1)=2

RuiLoureiro

  • Member
  • ****
  • Posts: 819
Re: math
« Reply #10 on: September 28, 2018, 06:26:15 AM »
Hi mab,
     
           square both sides of that formula and solving we get a+sqrt(b)=a+sqrt(b), so
you may demonstrate that it is true. Is easy.
 :t

daydreamer

  • Member
  • ****
  • Posts: 611
  • Navy on its way...
Re: math
« Reply #11 on: September 29, 2018, 03:14:21 AM »
you know the trigo rotation way formula,I understand its kinda made from two different triangles which have equal radius 1=R=sqrt(x^2+y^2) and 1=R=sqrt(Xnew^2+Ynew^2) and it can also be expressed in cosine and sine and you start with make it an equation of the new X and Y on one left side and the right side the cosine and sine
and solve it until you get trigo rotation formulas for Xnew and Ynew
but I am no math teacher to show all steps,so I hope someone could write that for me
Quote from Flashdance
Nick  :  When you give up your dream, you die.m
*wears a flameproof asbestos suit*

mabdelouahab

  • Member
  • ***
  • Posts: 398
Re: math
« Reply #12 on: September 29, 2018, 04:20:54 AM »
Hi RuiLoureiro ,
this is the formula demonstration

sqrt(a+sqrt(b))=sqrt((a+sqrt(a^2-b))/2)+ sqrt((a-sqrt(a^2-b))/2)

<=> sqrt(a+sqrt(b))=(sqrt((a+sqrt(a^2-b)))+ sqrt((a-sqrt(a^2-b))))/sqrt(2)
<=> sqrt(2)*sqrt(a+sqrt(b))=sqrt((a+sqrt(a^2-b)))+ sqrt((a-sqrt(a^2-b)))

if c=sqrt(a^2-b)

<=> sqrt(2)*sqrt(a+sqrt(b))=sqrt((a+c))+ sqrt((a-c))
<=> 2*(a+sqrt(b)=(sqrt((a+c))+ sqrt((a-c)))^2
<=> 2*(a+sqrt(b))=(a+c)+(a-c)+2*sqrt((a+c))*sqrt((a-c))
<=> 2*a+2*sqrt(b))=2*a+2*sqrt((a+c)*(a-c))
<=> a+sqrt(b))=a+sqrt((a+c)*(a-c))
<=> sqrt(b))=sqrt((a+c)*(a-c))
<=> b=(a+c)*(a-c)
<=> b=a^2-c^2
<=> b=a^2-a^2+b
<=> 0=0
It's easy.

RuiLoureiro

  • Member
  • ****
  • Posts: 819
Re: math
« Reply #13 on: September 29, 2018, 04:48:52 AM »
Hi mab,
            seems that you did it well  :t
            but we may do it in 3/4 steps only (you did in 12...:biggrin:
« Last Edit: September 29, 2018, 06:28:40 AM by RuiLoureiro »

mabdelouahab

  • Member
  • ***
  • Posts: 398
Re: math
« Reply #14 on: September 29, 2018, 07:26:07 AM »
Ok

sqrt(a+sqrt(b))=sqrt((a+sqrt(a^2-b))/2)+ sqrt((a-sqrt(a^2-b))/2)
c=sqrt(a^2-b)

<=> sqrt(a+sqrt(b))=sqrt((a+c)/2)+ sqrt((a-c)/2)
<=> a+sqrt(b)=(a+c)/2+(a-c)/2+2*(sqrt((a+c)/2)* sqrt((a-c)/2))
<=> sqrt(b)=sqrt(a+c)*sqrt(a-c)
<=> b=(a+c)*(a-c)
<=> b=a^2-c^2
<=> b=a^2-a^2+b
<=> 0=0