The MASM Forum

General => The Campus => Topic started by: RuiLoureiro on April 08, 2017, 08:03:13 AM

Title: TheCalculator-new powerful version 2017
Post by: RuiLoureiro on April 08, 2017, 08:03:13 AM
Hi all
        This is to announce the end of my main, basic and fundamental work
        that put «TheCalculator» to compute a derivative of any function of
        x, correctly, showing simplified solutions (see yourself).
       
        We may compute any product, up to 4 factors A,B,C,D or
        any argument of 4 factors A,B,C,D:

        A*B*C*D             A*B/C/D = A*B/(C*D)
        A*B*C/D             A/B*C/D = A*C/(B*D)
        A*B/C*D             A/B/C*D = A*D/(B*C)
        A/B*C*D =A*C*D/B
        ...                 ...
        A/B/C/D = A/(B*C*D) - we dont need to use brackets to solve any case

        In this version, we may use:

        Integers, Reals (eg. 523.78 or 5.2378E2 ),
        Rational numbers (k/n),
        pi and literal constantes a,b,c,d,e,f,...

        We may use up to 5 nested functions in each factor.

        This was done following a new complete method that i created:
        we analyse the expression and we give the answer case by case.
        Any mathematical expression is one of 3 types only:
        single,multiple or sum. And any expression is coded in 32 bites.
        But first we transform any expression into a symbolic expression
        and then we call a procedure that solves the symbolic expression.
        And it works ... correctly.
        The structure of variables has now 330000 bytes in the stack.
        It was written using Quick Editor - by Hutch.

        Now, i am testing all kind of expressios and getting the solutions
        to one file of complete examples. I want to correct something
        wrong before posting it. So, i will post it as soon as possible.

        Thank you Jochen Nidud, Dave,HSE,... and all friends
        Thanks
        Regards
        Rui Loureiro
                                 http://masm32.com/board/index.php?topic=6197.0     <<<<<<<<
Quote
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; example with brackets: A/(B*C*D) - all functions of x

input box=>     [x / (e^x * sin(3*pi/x) * cos(x^2-tan(3*pi*x)))]'

solution box1=> (
                  ( e^x*sin(3*pi/x)*cos(x^2-tan(3*pi*x)) )  <<- brackets without meaning
                 
                  -x * ( e^x*sin(3*pi/x)*cos(x^2-tan(3*pi*x))
                 
                         -3*pi/x^2*cos(3*pi/x)*e^x*cos(x^2-tan(3*pi*x))
                 
                         +(2*x-3*pi*sec(3*pi*x)^2)*sin(x^2-tan(3*pi*x))*e^x*sin(3*pi/x)
                       )

                )/(e^x*sin(3*pi/x)*cos(x^2-tan(3*pi*x)))^2               
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; example of arguments with 4 factors A,B,C,D

input box=> [ sin(a*x^2*tan(3*pi*x)*e^x) * cos(a*x^2*tan(3*pi*x)*e^x)]'

solution box1=> a * ( 2*x * e^x * tan(3*pi*x)

                     +3*pi * sec(3*pi*x)^2 * x^2 * e^x
                   
                     +e^x * x^2 * tan(3*pi*x)

                    ) * cos(a*x^2*tan(3*pi*x)*e^x) * cos(a*x^2*tan(3*pi*x)*e^x)
                   
               -a * ( 2*x * e^x * tan(3*pi*x)

                      +3*pi * sec(3*pi*x)^2 * x^2 * e^x

                     +e^x * x^2 * tan(3*pi*x)
                     
                    ) * sin(a*x^2*tan(3*pi*x)*e^x) * sin(a*x^2*tan(3*pi*x)*e^x)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; example of  4 factors A,B,C,D

input box=>     [a * x^2 * tan(3*pi*x) * e^x]'

solution box1=> a * ( 2*x * e^x * tan(3*pi*x)
                     + 3*pi * sec(3*pi*x)^2 * x^2 * e^x
                     + e^x * x^2 * tan(3*pi*x)
                    )
Title: Re: TheCalculator-new powerful version 2017
Post by: RuiLoureiro on April 08, 2017, 08:07:07 AM
Hi all

Here more examples
Quote
; example with brackets: 1/(A*B*C) - functions of x

input box=>     [1/(x*sin(3*pi/x)*cos(x^2-tan(3*pi*x)))]'

solution box1=> -( sin(3*pi/x)*cos(x^2-tan(3*pi*x))
                  -3*pi/x^2*cos(3*pi/x)*x*cos(x^2-tan(3*pi*x))
                  +(2*x-3*pi*sec(3*pi*x)^2)*sin(x^2-tan(3*pi*x))*x*sin(3*pi/x)

                 ) / (x*sin(3*pi/x)*cos(x^2-tan(3*pi*x)))^2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; example without brackets: 1/A/B/C - functions of x

input box=>     [1/x/sin(3*pi/x)/cos(x^2-tan(3*pi*x))]'

solution box1=> -( sin(3*pi/x)*cos(x^2-tan(3*pi*x))
                  -3*pi/x^2*cos(3*pi/x)*x*cos(x^2-tan(3*pi*x))
                  -(2*x-3*pi*sec(3*pi*x)^2)*sin(x^2-tan(3*pi*x))*x*sin(3*pi/x)

                 ) / (x*sin(3*pi/x)*cos(x^2-tan(3*pi*x)))^2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; example: A*B*C - functions of x

input box=>     [x * sin(3*pi/x) * cos(x^2-tan(3*pi*x))]'

solution box1=>    sin(3*pi/x)*cos(x^2-tan(3*pi*x))

                   -3*pi/x^2*cos(3*pi/x)*x*cos(x^2-tan(3*pi*x))
               
                   -(2*x-3*pi*sec(3*pi*x)^2)*sin(x^2-tan(3*pi*x))*x*sin(3*pi/x)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; example of B' - B is a function of x

input box=>     [sin(3*pi/x)]'

solution box1=> -3*pi/ x^2 * cos(3*pi/x)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; example of C' - C is a function of x with nested functions

input box=>     [cos(x^2-tan(3*pi*x))]'

solution box1=> -( 2*x - 3*pi*sec(3*pi*x)^2) * sin(x^2-tan(3*pi*x))

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; example with brackets: A/(B*C) - all functions of x

input box=>     [x / ( sin(3*pi/x) * cos(x^2-tan(3*pi*x)) )]'

solution box1=> (
                  ( sin(3*pi/x) * cos(x^2-tan(3*pi*x)) )    <<- brackets without meaning

                  -x * ( -3*pi/x^2 * cos(3*pi/x) * cos(x^2-tan(3*pi*x))

                         +(2*x-3*pi*sec(3*pi*x)^2)*sin(x^2-tan(3*pi*x)) * sin(3*pi/x)
                       )

                ) / (sin(3*pi/x)*cos(x^2-tan(3*pi*x)))^2


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; example without brackets: A/B/C - all functions of x

input box=>     [x / sin(3*pi/x) / cos(x^2-tan(3*pi*x)) ]'

solution box1=> (
                  sin(3*pi/x)*cos(x^2-tan(3*pi*x))      <<- without brackets

                  -x * ( -3*pi/x^2*cos(3*pi/x)*cos(x^2-tan(3*pi*x))

                         +(2*x-3*pi*sec(3*pi*x)^2) * sin(x^2-tan(3*pi*x)) *sin(3*pi/x)
                       )
                 ) / (sin(3*pi/x)*cos(x^2-tan(3*pi*x)))^2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; example without brackets: A/B/C/D - all functions of x

input box=>     [x / e^x / sin(3*pi/x) / cos(x^2-tan(3*pi*x))]'

solution box1=> (
                  e^x*sin(3*pi/x)*cos(x^2-tan(3*pi*x))      <<- without brackets

                  -x * ( e^x*sin(3*pi/x)*cos(x^2-tan(3*pi*x))
                 
                         -3*pi/x^2*cos(3*pi/x)*e^x*cos(x^2-tan(3*pi*x))
                 
                         +(2*x-3*pi*sec(3*pi*x)^2)*sin(x^2-tan(3*pi*x))*e^x*sin(3*pi/x)
                       )
                ) / (e^x*sin(3*pi/x)*cos(x^2-tan(3*pi*x)))^2
Title: Re: TheCalculator-new powerful version 2017
Post by: RuiLoureiro on April 08, 2017, 08:11:57 AM
Hi Hutch

        Many years ago, i taught higher mathematics in a higher school. I have a
        backgroud of twenty in twenty and 2 schools in one year. If you search, you
        may find one credit from an usa university. It was given to me- was given. Now,
        i am retired and i am 63 years old. So, now, i am doing things to pass the time.

        As far as i know, you dont like mathematics so it is possible that you
        dont consider TheCalculator an important project in this your site.
       
        I considered that you buried The Calculator elsewhere here in this your site and
        i dont know why - it was in The Campus since april 09 2012.

        I want to ask you if you allow the new version in The Workshop - or you may transfer
        the old one to Workshop.

        Thank you
        Regards
:icon14:

        Rui

Title: Re: TheCalculator-new powerful version 2017
Post by: HSE on April 08, 2017, 09:58:31 AM
Fantastic Rui!  :t

Whatever searcher find the calculator with the words "derivative masm32". More important that the place is the description that you make.
Title: Re: TheCalculator-new powerful version 2017
Post by: guga on April 08, 2017, 01:40:58 PM
Great work, as usual, Rui.

Did  you post the update ?
Title: Re: TheCalculator-new powerful version 2017
Post by: jj2007 on April 09, 2017, 12:17:39 PM
Quote from: RuiLoureiro on April 08, 2017, 08:11:57 AMi taught higher mathematics in a higher school.

That explains your passion for The Calculator, Rui - it's a great project :t

Btw I agree this project would be better suited for The Workshop, it's slightly too difficult for The Campus.

There is an interesting post by bitRAKE (https://board.flatassembler.net/topic.php?p=77515) showing how the RichEdit control can be used to display math:
QuoteMath Zone syntax is fairly easy, imho. Auto-correction will convert symbol names to the symbol (e.g. \alpha, \theta), and automatically create syntax groups based on function names or start/end synbols (e.g. matching (), {}, [], etc.). Also, there are built-in macros (\binomial, \integral, \limit, \quadratic, ...),

Search inside the page for re6mz.zip to find a 2048 bytes exe with a RichEdit control where you can type \integral[space] to get what is shown in the screenshot below. I have not implemented this option in RichMasm, but if there is an interest, I'll look into it.
Title: Re: TheCalculator-new powerful version 2017
Post by: jj2007 on April 17, 2017, 10:15:15 AM
The new RichMasm version posted here as part of the MasmBasic package (http://masm32.com/board/index.php?topic=94.0) can handle mathematical formulas.

I attach a demo with a number of shortcut examples. See also this post. (http://masm32.com/board/index.php?topic=5382.msg65316#msg65316)
Title: Re: TheCalculator-new powerful version 2017
Post by: hutch-- on April 18, 2017, 07:26:21 PM
Rui,

For the life of me, I cannot find your post containing the finished app you mentioned. The reason why I occasionally move very long threads that have been lingering for a very long time with only tiny incremental changes is because they block up the normal posts that other people make. If you have a finished version, post it in the Workshop.
Title: Re: TheCalculator-new powerful version 2017
Post by: jack on April 19, 2017, 11:49:23 PM
I thought I was the only one unable to see the download link  :biggrin:
Title: Re: TheCalculator-new powerful version 2017
Post by: RuiLoureiro on April 23, 2017, 07:44:34 AM
Hutch,
            Thank you, i will do it as soon as possible.
Jochen,
            Coming from you, one day, i learned 2 lessons: you and Dave
            are my good friends for ever. No more words.
            Thank you  :t

            I never forget all good friends like MichaelW, Gunther, Guga,
            Mikl__ or HSE. Of course Hutch - i use Quick Editor...
            You are also my friends for ever.
Hi all
            I have a lot of tested functions and
            all tested functions are correct.
            But now i am writing simplifiers, so
            next week or so i will post the calculator - first version.

            Thank all all
Quote
note: all these solutions are produced by a general procedure to
      give the derivative of any function
.

; example: all solutions are simplified

input box=> [ln(x/(3+a))    -ln(x/(3+a))    +ln(-x/(3+a))     -ln(-x/(3+a))
            +ln(2*x/(3+a))  -ln(2*x/(3+a))  +ln(-2*x/(3+a))   -ln(-2*x/(3+a))
            +ln(x^2/(3+a))  -ln(x^2/(3+a))  +ln(-x^2/(3+a))   -ln(-x^2/(3+a))
            +ln(3*x^2/(3+a))-ln(3*x^2/(3+a))+ln(-3*x^2/(3+a)) -ln(-3*x^2/(3+a))
            +ln(x^2)        -ln(x^2)        +ln(-x^2)         -ln(-x^2)
            +ln(3*x^2)      -ln(3*x^2)      +ln(-3*x^2)       -ln(-3*x^2)
           
            +ln(x^3)        -ln(x^3)        +ln(-x^3)         -ln(-x^3)
            +ln(2*x^3)      -ln(2*x^3)      +ln(-2*x^3)       -ln(-2*x^3)]'

solution box1=> 1/x         -1/x            +1/x              -1/x
               +1/x         -1/x            +1/x              -1/x
               +2*x^-1      -2*x^-1         +2*x^-1           -2*x^-1
               +2*x^-1      -2*x^-1         +2*x^-1           -2*x^-1
               +2*x^-1      -2*x^-1         +2*x^-1           -2*x^-1
               +2*x^-1      -2*x^-1         +2*x^-1           -2*x^-1
               
               +3*x^-1      -3*x^-1         +3*x^-1           -3*x^-1
               +3*x^-1      -3*x^-1         +3*x^-1           -3*x^-1               
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; example: solutions ARE NOT simplified yet, but are correct

input box=>     [ln(x/5)       -ln(x/5)        +ln(-x/5)         -ln(-x/5)
                +ln(2*x/5)     -ln(2*x/5)      +ln(-2*x/5)       -ln(-2*x/5)
                +ln(x^2/5)     -ln(x^2/5)      +ln(-x^2/5)       -ln(-x^2/5)
               
                +ln(3*x^2/5)   -ln(3*x^2/5)    +ln(-3*x^2/5)     -ln(-3*x^2/5)
               
                +ln(x^3/5)     -ln(x^3/5)      +ln(-x^3/5)       -ln(-x^3/5)
               
                +ln(2*x^3/5)   -ln(2*x^3/5)    +ln(-2*x^3/5)     -ln(-2*x^3/5)]'

solution box1=> (5/x)/5        -(1/5)*(5/x)    +(1/5)*(5/x)      -(1/5)*(5/x)
               +(2/5)*5/(2*x)  -(2/5)*5/(2*x)  +(2/5)*5/(2*x)    -(2/5)*5/(2*x)
               +2/5*x*5*x^-2   -2/5*x*5*x^-2   +2/5*x*5*x^-2     -2/5*x*5*x^-2

               +(3/5)*2*x*5/(3*x^2)             -(3/5)*2*x*5/(3*x^2)
               +(3/5)*2*x*5/(3*x^2)             -(3/5)*2*x*5/(3*x^2)

               +3/5*x^2*5*x^-3                  -3/5*x^2*5*x^-3
               +3/5*x^2*5*x^-3                  -3/5*x^2*5*x^-3
               
               +(2/5)*3*x^2*5/(2*x^3)           -(2/5)*3*x^2*5/(2*x^3)
               +(2/5)*3*x^2*5/(2*x^3)           -(2/5)*3*x^2*5/(2*x^3)
Title: Re: TheCalculator-new powerful version 2017
Post by: RuiLoureiro on April 26, 2017, 08:38:01 AM
Hi 
        Here are simplified solutions given by TheCalculator
        We may see a lot of solutions in the file TheCalculator_derivatives03.txt below.
        I will post TheCalculator this week in The Workshop.

        See you
Quote
input box=>     [ln(x/(3+a))        -ln(x/(3+a))    +ln(-x/(3+a))       -ln(-x/(3+a))
                +ln(2*x/(3+a))      -ln(2*x/(3+a))  +ln(-2*x/(3+a))     -ln(-2*x/(3+a))
                +ln(x^2/(3+a))      -ln(x^2/(3+a))  +ln(-x^2/(3+a))     -ln(-x^2/(3+a))
                +ln(3*x^2/(3+a))    -ln(3*x^2/(3+a))+ln(-3*x^2/(3+a))   -ln(-3*x^2/(3+a))
                +ln(x^2)            -ln(x^2)        +ln(-x^2)           -ln(-x^2)
                +ln(3*x^2)          -ln(3*x^2)      +ln(-3*x^2)         -ln(-3*x^2)
                +ln(x^3)            -ln(x^3)        +ln(-x^3)           -ln(-x^3)
                +ln(2*x^3)          -ln(2*x^3)      +ln(-2*x^3)         -ln(-2*x^3)     
                +ln(x/5)            -ln(x/5)        +ln(-x/5)           -ln(-x/5)       
                +ln(2*x/5)          -ln(2*x/5)      +ln(-2*x/5)         -ln(-2*x/5)     
                +ln(x^2/5)          -ln(x^2/5)      +ln(-x^2/5)         -ln(-x^2/5)     
                +ln(3*x^2/5)        -ln(3*x^2/5)    +ln(-3*x^2/5)       -ln(-3*x^2/5)   
                +ln(x^3/5)          -ln(x^3/5)      +ln(-x^3/5)         -ln(-x^3/5)     
                +ln(2*x^3/5)        -ln(2*x^3/5)    +ln(-2*x^3/5)       -ln(-2*x^3/5)]'

solution box1=> 1/x             -1/x            +1/x                -1/x
                +1/x            -1/x            +1/x                -1/x
                +2*x^-1         -2*x^-1         +2*x^-1             -2*x^-1
                +2*x^-1         -2*x^-1         +2*x^-1             -2*x^-1
                +2*x^-1         -2*x^-1         +2*x^-1             -2*x^-1
                +2*x^-1         -2*x^-1         +2*x^-1             -2*x^-1
                +3*x^-1         -3*x^-1         +3*x^-1             -3*x^-1
                +3*x^-1         -3*x^-1         +3*x^-1             -3*x^-1
                +1/x            -1/x            +1/x                -1/x
                +1/x            -1/x            +1/x                -1/x
                +2*x^-1         -2*x^-1         +2*x^-1             -2*x^-1
                +2*x^-1         -2*x^-1         +2*x^-1             -2*x^-1
                +3*x^-1         -3*x^-1         +3*x^-1             -3*x^-1
                +3*x^-1         -3*x^-1         +3*x^-1             -3*x^-1


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
input box=>     [ln(x/b)        -ln(x/b)        +ln(-x/b)       -ln(-x/b)
                +ln(2*x/b)      -ln(2*x/b)      +ln(-2*x/b)     -ln(-2*x/b)
                +ln(x^2/b)      -ln(x^2/b)      +ln(-x^2/b)     -ln(-x^2/b)
                +ln(3*x^2/b)    -ln(3*x^2/b)    +ln(-3*x^2/b)   -ln(-3*x^2/b)
                +ln(x^3/b)      -ln(x^3/b)      +ln(-x^3/b)     -ln(-x^3/b)
                +ln(2*x^3/b)    -ln(2*x^3/b)    +ln(-2*x^3/b)   -ln(-2*x^3/b)
                +ln(a*x/b)      -ln(a*x/b)      +ln(-a*x/b)     -ln(-a*x/b)
                +ln(a*x^2/b)    -ln(a*x^2/b)    +ln(-a*x^2/b)   -ln(-a*x^2/b)   
                +ln(a*x^3/b)    -ln(a*x^3/b)    +ln(-a*x^3/b)   -ln(-a*x^3/b)]'

solution box1=> 1/x             -1/x            +1/x            -1/x
                +1/x            -1/x            +1/x            -1/x
                +2*x^-1         -2*x^-1         +2*x^-1         -2*x^-1
                +2*x^-1         -2*x^-1         +2*x^-1         -2*x^-1
                +3*x^-1         -3*x^-1         +3*x^-1         -3*x^-1
                +3*x^-1         -3*x^-1         +3*x^-1         -3*x^-1
                +1/x            -1/x            +1/x            -1/x
                +2*x^-1         -2*x^-1         +2*x^-1         -2*x^-1
                +3*x^-1         -3*x^-1         +3*x^-1         -3*x^-1
Title: Re: TheCalculator-new powerful version 2017
Post by: HSE on April 26, 2017, 10:26:48 AM
Hi Rui!!

What purpose have this in the input box:+ln(-x^2/b)     -ln(-x^2/b)

You can simplify the input 8)
Title: Re: TheCalculator-new powerful version 2017
Post by: RuiLoureiro on April 27, 2017, 02:41:20 AM
Quote from: HSE on April 26, 2017, 10:26:48 AM
Hi Rui!!

What purpose have this in the input box:+ln(-x^2/b)     -ln(-x^2/b)

You can simplify the input 8)
Hi HSE,
             It is to test all 4 cases: function is ln(u)- u is x^2/b

             case1:  ln(u)
             case2:-ln(u)
             case3:  ln(-u)
             case4: -ln(-u)
                                                   [ln(u)]' = u' * u^-1

             We have a general procedure to get u' and a general procedure to multiply A by B.
             Thanks
             See you  :t
Title: Re: TheCalculator-new powerful version 2017
Post by: HSE on April 27, 2017, 06:50:15 AM
 :biggrin: Yes, but if you simplify then you don't see nothing. It's not a simplified solution.
Title: Re: TheCalculator-new powerful version 2017
Post by: RuiLoureiro on April 27, 2017, 07:34:01 AM
Quote from: HSE on April 27, 2017, 06:50:15 AM
:biggrin: Yes, but if you simplify then you don't see nothing. It's not a simplified solution.
Hi HSE,

Yes they are simplified solutions (reply#10). If we have A= (x^2-1)/(x+1) it may be one solution of any problem but it is not a simplified solution. The simplified solution is A= x-1. It is one example only and you may show why.
See you
Title: Re: TheCalculator-new powerful version 2017
Post by: HSE on April 27, 2017, 09:18:36 AM
Unsimplified sumatory of simplified terms solutions?  :biggrin:
Title: Re: TheCalculator-new powerful version 2017
Post by: RuiLoureiro on April 28, 2017, 04:42:55 AM
Quote from: HSE on April 26, 2017, 10:26:48 AM
Hi Rui!!

What purpose have this in the input box:+ln(-x^2/b)     -ln(-x^2/b)

You can simplify the input 8)
Hi HSE,

What input ? What do you mean ? Give an example please
Title: Re: TheCalculator-new powerful version 2017
Post by: guga on April 28, 2017, 04:50:34 AM
Oi Rui

Small suggestion :)

Can you rebuild the gui to it be a bit more user friendly ? For example, displaying the result on a unique edit control (or rich edit control) that displays the several solutions possible, maybe display it in a form similar to http://www.wolframalpha.com

And, also, making it produce possible roots.

Btw...are you sure about some results ??

I just inputed:

(x^2-x*sin(x-x^2))'

and after pressing "compute" it resulted in:

2*x-[sin(x-x^2)+x*(1-2*x)*cos(x-x^2)]

But....is it correct ?? According to www.wolframalpha.com, the same input is unrolled with the possible solutions:

x (x - sin(x - x^2))
or
-x (sin(x - x^2) - x)
or
x^2 - x sin(x) cos(x^2) + x sin(x^2) cos(x)

Which are different from what you found.

I did this:

From wolfrang, i placed your equation as input in one window and your solution as input in another window and both results differs.

According to wolfrang, this (x^2-x*sin(x-x^2))
is not the same as 2*x-[sin(x-x^2)+x*(1-2*x)*cos(x-x^2)]


i made the proof, simply replacing x with 5 (just to give me some values to test the results)

And the results differs:

taking x = 5
(x^2-x*sin(x-x^2)) = 26.71010071662834366522049807341129790381541683757080314232...

2*x-[sin(x-x^2)+x*(1-2*x)*cos(x-x^2)] = 52.62818807869154601547901709429517572789244940941506911752...





Just click here to you see what i mean:
http://www.wolframalpha.com/input/?i=(x%5E2-x*sin(x-x%5E2)) (http://www.wolframalpha.com/input/?i=(x%5E2-x*sin(x-x%5E2)))
http://www.wolframalpha.com/input/?i=2*x-(sin(x-x%5E2)%2Bx*(1-2*x)*cos(x-x%5E2)) (http://www.wolframalpha.com/input/?i=2*x-(sin(x-x%5E2)%2Bx*(1-2*x)*cos(x-x%5E2)))

or
http://www.wolframalpha.com/input/?i=(5%5E2-5*sin(5-5%5E2)) (http://www.wolframalpha.com/input/?i=(5%5E2-5*sin(5-5%5E2)))
http://www.wolframalpha.com/input/?i=2*5-(sin(5-5%5E2)%2B5*(1-2*5)*cos(5-5%5E2)) (http://www.wolframalpha.com/input/?i=2*5-(sin(5-5%5E2)%2B5*(1-2*5)*cos(5-5%5E2)))
Title: Re: TheCalculator-new powerful version 2017
Post by: guga on April 28, 2017, 05:06:45 AM
Another example of error ?

Quote; example of C' - C is a function of x with nested functions

input box=>     [cos(x^2-tan(3*pi*x))]'

solution box1=> -( 2*x - 3*pi*sec(3*pi*x)^2) * sin(x^2-tan(3*pi*x))

This seems incorrect.

According to wolfrang, the result are different

http://www.wolframalpha.com/input/?i=cos(x%5E2-tan(3*pi*x)) (http://www.wolframalpha.com/input/?i=cos(x%5E2-tan(3*pi*x)))

is not the same as:

http://www.wolframalpha.com/input/?i=-(+2*x+-+3*pi*sec(3*pi*x)%5E2)+*+sin(x%5E2-tan(3*pi*x)) (http://www.wolframalpha.com/input/?i=-(+2*x+-+3*pi*sec(3*pi*x)%5E2)+*+sin(x%5E2-tan(3*pi*x)))

They produces different results for x

The possible forms are:

sin(x^2) sin(tan(3 π x)) + cos(x^2) cos(tan(3 π x))
cos(x^2 - 1/3 tan(PI x) - (4 sin(2 PI x))/(3 (2 cos(2 PI x) - 1)))
Title: Re: TheCalculator-new powerful version 2017
Post by: RuiLoureiro on April 28, 2017, 06:53:43 AM
Quote from: HSE on April 27, 2017, 09:18:36 AM
Unsimplified sumatory of simplified terms solutions?  :biggrin:
Understand: it was used for testing HSE.
Title: Re: TheCalculator-new powerful version 2017
Post by: RuiLoureiro on April 28, 2017, 06:57:09 AM
Olá Guga,
It's very simple: it (seems) you dont know what you are doing.
note: explanatios: $300 per minute for you only today - very cheap...
See you

Title: Re: TheCalculator-new powerful version 2017
Post by: guga on April 28, 2017, 07:40:36 AM
Ouch $$$$  :P

Indeed...the "'" sign at the end of the equation was for the derivative  :icon_mrgreen: :icon_mrgreen:

I took the input from your example, but didn´t took attention for the derivative results from yours and wolfrang´s :greensml: :greensml:

Quoteexample of C' - C is a function of x with nested functions

input box=>     [cos(x^2-tan(3*pi*x))]'

solution box1=> -( 2*x - 3*pi*sec(3*pi*x)^2) * sin(x^2-tan(3*pi*x))
Title: Re: TheCalculator-new powerful version 2017
Post by: RuiLoureiro on April 29, 2017, 06:44:48 AM
Quote from: guga on April 28, 2017, 07:40:36 AM
Ouch $$$$  :P

Indeed...the "'" sign at the end of the equation was for the derivative  :icon_mrgreen: :icon_mrgreen:

I took the input from your example, but didn´t took attention for the derivative results from yours and wolfrang´s :greensml: :greensml:

Quoteexample of C' - C is a function of x with nested functions

input box=>     [cos(x^2-tan(3*pi*x))]'

solution box1=> -( 2*x - *pi*sec(3*pi*x)^2) * sin(x^2-tan(3*pi*x))
Brincando, não ?
wolframa, não gosto nada daquilo
http://masm32.com/board/index.php?topic=6197.0
Title: Re: TheCalculator-new powerful version 2017
Post by: jack on May 01, 2017, 03:25:40 AM
hello RuiLoureiro :P
your simplifier is really good but according to Maple the last 5 derivatives in TheCalculator_derivatives04.txt should be 0
Title: Re: TheCalculator-new powerful version 2017
Post by: RuiLoureiro on May 01, 2017, 04:41:18 AM
Quote from: jack on May 01, 2017, 03:25:40 AM
hello RuiLoureiro :P
your simplifier is really good but according to Maple the last 5 derivatives in TheCalculator_derivatives04.txt should be 0
Hello Jack
           First of all, thank you for your reply.

a) About «your simplifier is really good»:
           Yes seems to do what it should do.
           Tommorrow, i will post the new version .02
           because it does not simplify ln(a*x^-1/b), for instance.

b) About «according to Maple the last 5 derivatives
          in TheCalculator_derivatives04.txt should be 0»

          According to basic algebra rule,  A-A=0 for any A.
          So, if we have in the input box:  A-A+B-B (=0)
          we have 0. So each group of 4 (not 5) functions in the input box
           ( and solution box, of course ) are 0
          [log(x/b)       -log(x/b)    +log(-x/b)     -log(-x/b)=0]
          and then 0'=0. Then the sum is 0 also. The derivative of
          any constant is 0, cannot be any function of x.

          So
          [+3/(ln(10)*x)    -3/(ln(10)*x)+3/(ln(10)*x)  -3/(ln(10)*x) =0]

          But it has nothing to do with the simplifier. You must do the sum,
          not the calculator. The simplifier simplifies EACH DERIVATIVE ONLY.

          Example: derivative of [ln(a*x/b)]

          [ln(a*x/b)]' = [(a/b)* x]' / ( (a/b)*x)= 1/x = x^-1

          Understood ?
         
          See you
          Thanks

EDIT:TheCalculator was updated.       

note: when we want to see the derivatives of N functions A,B,C,D,... the best way
           is to test [A+B+C+D+...]' = A' + B' + C' + D'+...     not one by one !
           
                                           http://masm32.com/board/index.php?topic=6197.0 (http://masm32.com/board/index.php?topic=6197.0)
HERE it is: functions and each derivative
Quote
Friday, 28-04-2017  19:09:04

input box=>     [log(x/b)       -log(x/b)    +log(-x/b)     -log(-x/b)
                +log(2*x/b)     -log(2*x/b)  +log(-2*x/b)   -log(-2*x/b)
                +log(x^2/b)     -log(x^2/b)  +log(-x^2/b)   -log(-x^2/b)
                +log(3*x^2/b)   -log(3*x^2/b)+log(-3*x^2/b) -log(-3*x^2/b)
                +log(x^3/b)     -log(x^3/b)  +log(-x^3/b)   -log(-x^3/b)
                +log(2*x^3/b)   -log(2*x^3/b)+log(-2*x^3/b) -log(-2*x^3/b)
                +log(a*x/b)     -log(a*x/b)  +log(-a*x/b)   -log(-a*x/b)
                +log(a*x^2/b)   -log(a*x^2/b)+log(-a*x^2/b) -log(-a*x^2/b)
                +log(a*x^3/b)   -log(a*x^3/b)+log(-a*x^3/b) -log(-a*x^3/b)]'    (-> =0)

solution box1=> 1/(ln(10)*x)    -1/(ln(10)*x)+1/(ln(10)*x)  -1/(ln(10)*x)
               +1/(ln(10)*x)    -1/(ln(10)*x)+1/(ln(10)*x)  -1/(ln(10)*x)
               +2/(ln(10)*x)    -2/(ln(10)*x)+2/(ln(10)*x)  -2/(ln(10)*x)
               +2/(ln(10)*x)    -2/(ln(10)*x)+2/(ln(10)*x)  -2/(ln(10)*x)
               +3/(ln(10)*x)    -3/(ln(10)*x)+3/(ln(10)*x)  -3/(ln(10)*x)
               +3/(ln(10)*x)    -3/(ln(10)*x)+3/(ln(10)*x)  -3/(ln(10)*x)
               +1/(ln(10)*x)    -1/(ln(10)*x)+1/(ln(10)*x)  -1/(ln(10)*x)
               +2/(ln(10)*x)    -2/(ln(10)*x)+2/(ln(10)*x)  -2/(ln(10)*x)
               +3/(ln(10)*x)    -3/(ln(10)*x)+3/(ln(10)*x)  -3/(ln(10)*x)   (-> =0)
Title: Re: TheCalculator-new powerful version 2017
Post by: RuiLoureiro on May 09, 2017, 04:27:45 AM
Hi all
        TheCalculator was updated today.

Hutch,
         The Quick Editor doesnt replace all cases.
         When i have an expression with a lot of cases ( .../(x-b) )
         it replaces some cases but fails 2 or 3.
         e.g. replace "(x-b)" by "(x-3)". It fails some cases.

        http://masm32.com/board/index.php?topic=6197.0 (http://masm32.com/board/index.php?topic=6197.0)

Here the example

Replace text:  /(x-b)
by
text:         /(x+3)

See the result:
Quote
[a^((x-a)/(x-b))+exp((x-a)/(x-b))+e^((x-a)/(x-b))+10^((x-a)/(x-b))+ten((x-a)/(x-b))+ln((x-a)/(x-b))+lo
g((x-a)/(x-b))+sqr((x-a)/(x-b))+sin((x-a)/(x-b))+cos((x-a)/(x-b))+tan((x-a)/(x-b))+cot((x-a)/(x-b))+sec((x-a)/(x-b)
)+csc((x-a)/(x-b))+arcsin((x-a)/(x-b))+arccos((x-a)/(x-b))+arctan((x-a)/(x-b))+arccot((x-a)/(x-b))+arcsec((x-a)/(x-b))
+arccsc((x-a)/(x-b))+sind((x-a)/(x-b))+cosd((x-a)/(x-b))+tand((x-a)/(x-b))+cotd((x-a)/(x-b))+secd((x-a)/(x-b)
)+cscd((x-a)/(x-b))+arcsind((x-a)/(x-b))+arccosd((x-a)/(x-b))+arctand((x-a)/(x-b))+arccotd((x-a)/(x-b))+arcsecd((a
-x)/(x-b))+arccscd((x-a)/(x-b))+sinh((x-a)/(x-b))+cosh((x-a)/(x-b))+tanh((x-a)/(x-b))+coth((x-a)/(x-b))+sech((x-a)
/(x-b))+csch((x-a)/(x-b))+arcsinh((x-a)/(x-b))+arccosh((x-a)/(x-b))+arctanh((x-a)/(x-b))+arccoth((x-a)/(x-b))+arcs
ech((x-a)/(x-b))+arccsch((x-a)/(x-b))]

[a^((x-a)/(x+3))+exp((x-a)/(x+3))+e^((x-a)/(x+3))+10^((x-a)/(x+3))+ten((x-a)/(x+3))+ln((x-a)/(x+3))+lo
g((x-a)/(x+3))+sqr((x-a)/(x+3))+sin((x-a)/(x+3))+cos((x-a)/(x+3))+tan((x-a)/(x+3))+cot((x-a)/(x+3))+sec((x-a)/(x-b)
)+csc((x-a)/(x+3))+arcsin((x-a)/(x+3))+arccos((x-a)/(x+3))+arctan((x-a)/(x+3))+arccot((x-a)/(x+3))+arcsec((x-a)/(x-b))+arccsc((x-a)/(x+3))+sind((x-a)/(x+3))+cosd((x-a)/(x+3))+tand((x-a)/(x+3))+cotd((x-a)/(x+3))+secd((x-a)/(x+3)
)+cscd((x-a)/(x+3))+arcsind((x-a)/(x+3))+arccosd((x-a)/(x+3))+arctand((x-a)/(x+3))+arccotd((x-a)/(x+3))+arcsecd((a
-x)/(x+3))+arccscd((x-a)/(x+3))+sinh((x-a)/(x+3))+cosh((x-a)/(x+3))+tanh((x-a)/(x+3))+coth((x-a)/(x+3))+sech((x-a)
/(x+3))+csch((x-a)/(x+3))+arcsinh((x-a)/(x+3))+arccosh((x-a)/(x+3))+arctanh((x-a)/(x+3))+arccoth((x-a)/(x+3))+arcs
ech((x-a)/(x+3))+arccsch((x-a)/(x+3))]
Title: Re: TheCalculator-new powerful version 2017
Post by: RuiLoureiro on May 21, 2017, 03:19:15 AM
Hi all,
        TheCalculator was updated to a more powerful version 2017.06.

        Good luck  :t
:icon14:
                         http://masm32.com/board/index.php?topic=6197.msg66982#msg66982 (http://masm32.com/board/index.php?topic=6197.msg66982#msg66982)
Title: Re: TheCalculator-new powerful version 2017
Post by: newrobert on May 21, 2017, 09:34:13 AM
2017.6? too earyly?
only exe file, not source code?
Title: Re: TheCalculator-new powerful version 2017
Post by: RuiLoureiro on May 23, 2017, 07:16:29 AM
Quote from: newrobert on May 21, 2017, 09:34:13 AM
2017.6? too earyly?
only exe file, not source code?
Hello Robert,
                    Did you test the version 2017.06 ?
                    And what do you say about it ?
See you
:icon14:
                            http://masm32.com/board/index.php?topic=6197.msg66982#msg66982 (http://masm32.com/board/index.php?topic=6197.msg66982#msg66982)
Title: Re: TheCalculator-new powerful version 2017
Post by: newrobert on May 23, 2017, 10:09:41 AM
i try it, and i see there are vector or matrix define and opperate, as you know matrix have three common operation in 3D space,
move,scale and rotate, so in the future, are there the 3x3 matrix to support it?
Title: Re: TheCalculator-new powerful version 2017
Post by: RuiLoureiro on May 24, 2017, 07:44:35 AM
Quote from: newrobert on May 23, 2017, 10:09:41 AM
i try it, and i see there are vector or matrix define and opperate, as you know matrix have three common operation in 3D space,
move,scale and rotate, so in the future, are there the 3x3 matrix to support it?
Hi Robert,
               Here, we may get the old version
               http://masm32.com/board/index.php?topic=175.0 (http://masm32.com/board/index.php?topic=175.0)
               Right now i dont know what i will do in the near future
               because i need to do some more work about DERIVATIVES
               in this version 2017.
               Matrix operations is a very easy thing,  so you may start it.
               First choose REAL4 ? REAL8 ? REAL10 ? and what you want
               to do. TheCalculator uses REAL10 each element is 16 bytes
               each matrix is 16 bytes aligned.
               In TheCalculator we define a matrix like this:
                a=[1,2,3;     4,5,6;      7,8,9];      <<<<- 3 lines, 3 columns.
               
Title: Re: TheCalculator-new powerful version 2017
Post by: newrobert on May 24, 2017, 09:28:56 AM
thank you very much, it's useful function;
Title: Re: TheCalculator-new powerful version 2017
Post by: RuiLoureiro on May 25, 2017, 06:12:48 AM
Quote from: newrobert on May 24, 2017, 09:28:56 AM
thank you very much, it's useful function;
:t

              Search for: RuiLoureiro you may find more things.
Example:
                 http://masm32.com/board/index.php?topic=1852.0 (http://masm32.com/board/index.php?topic=1852.0)
                 http://masm32.com/board/index.php?topic=1914.msg19899#msg19899