nerdamer icon indicating copy to clipboard operation
nerdamer copied to clipboard

How can I use nerdamer to...

Open Happypig375 opened this issue 8 years ago • 19 comments

  1. Find the value of 27^x+27^(-x) if 3^x+3^(-x)=4
  2. Find the value of 1/a-1/b if (12.5)^a=1000 and (0.0125)^b=1000
  3. Find the value of x^6+x^(-6) if x+x^(-1)=3, x>0
  4. Simplify sqrt(x+sqrt(x^2+1)) if x=1/2(a^2-a^(-2)) and a>0
  5. Find the value of a^(2x) if (a^(3x)+a^(-3x))/(a^x+a^(-x))=1
  6. Find the value of x*y*z if m=a^x, n=a^y, m^y*n^x=a^(2/z), a>0, z!=0
  7. Find a relation connecting x, y and z if 2^(3x)=7^(4y)=28^(5z)
  8. Find the value of 2/x+3/y in terms of z if 8^x=9^y=6^z
  9. Find the value of x+y+z if a^(1/x)=b^(1/y)=c^(1/z)=a*b*c

There are currently no obvious way to calculate these using nerdamer.

Happypig375 avatar Sep 24 '17 14:09 Happypig375

My answers:

  1. 52
  2. 1
  3. 322
  4. a
  5. 1
  6. 1
  7. 10/(3x)+5/(4y)=1/z
  8. 6/z
  9. 1

Happypig375 avatar Sep 24 '17 14:09 Happypig375

These set of questions are the primary motivation for #233.

Happypig375 avatar Sep 24 '17 14:09 Happypig375

Sorry I was not free yesterday, but was there a message about creating a wish list...? image

Happypig375 avatar Sep 26 '17 10:09 Happypig375

Yes. I wrote that message but it sounded a bit mean after rereading it and I wanted to phrase it better. Can you please stop creating an issue when it's clearly related to an existing issue and a simple update of that issue would suffice. Example: In #210 you commented

#119 (my first ever issue on here pops up again) is already a big simplification. I would not see x^2+4x-45 and x^2+x-30 as having any common factors unless I factorize it specifically.

Yet you turn around and create issue #256. I got the message clearly with your original comment. In fact, you even identified how it should be solved. Another example: This issue is clearly related to solving equations with variable exponents. There was no need to create this one. You recently created two issues related to intervals and before that three issues related to units. I appreciate the feedback and I know you mean well but let's keep it somewhat organized. Creating an issue for everything does not help.

jiggzson avatar Sep 26 '17 13:09 jiggzson

Yet you turn around and create issue #256.

#256 is a bug with divide. It should have returned (x+9)/(x+6) but it returns (-15+3*x)*(-30+x+x^2)^(-1)+1.

Happypig375 avatar Sep 26 '17 13:09 Happypig375

This issue is clearly related to solving equations with variable exponents.

Solve does not support assumptions like x>0.

Happypig375 avatar Sep 26 '17 14:09 Happypig375

You recently created two issues related to intervals

Integer intervals are not required to implement solving inequalities so it is created as an separate issue.

Happypig375 avatar Sep 26 '17 14:09 Happypig375

three issues related to units

#230 is for general units #185 is for a global setting since angle units, take radians for example, is m m^-1, aka no unit. #248:

Well, those do not solve the problem of replacing builtin functions with custom implementations.

#154, #255 unrelated

Happypig375 avatar Sep 26 '17 14:09 Happypig375

Creating an issue for everything does not help.

Okay 😃

Happypig375 avatar Sep 26 '17 14:09 Happypig375

let's keep it somewhat organized

Remember #183? You edited it and labelled 2 more issues, but most issues are still not labeled.

Happypig375 avatar Sep 26 '17 14:09 Happypig375

@Happypig375

var x = nerdamer('(x^2+4x-45)/(x^2+x-30)').evaluate({x:2});
console.log(x.toString());
//output: 11/8
var y = nerdamer('(-15+3*x)*(-30+x+x^2)^(-1)+1').evaluate({x:2});
console.log(y.toString());
//output: 11/8

The fact that you're not getting the simplest answer doesn't make it a bug. I allow the users of the library to dictate its direction. This project is 100% a hobby for me. Nothing more. However I do care about how the library performs so I'm not particularly interested in loading it with every item on everyone's wish list or writing your program for you. If you can solve the issue yourself, please make that your first option. I'll be happy to provide you the tools you need to do so.

jiggzson avatar Sep 26 '17 14:09 jiggzson

However I do care about how the library performs

So performance is your top priority? Is "performance" speed or memory usage?

Happypig375 avatar Sep 26 '17 14:09 Happypig375

The fact that you're not getting the simplest answer doesn't make it a bug.

http://nerdamer.com/functions/divide.html

Returns the appropriate value if possible otherwise it returns the function with the simplified expression

Did I misunderstand this line?

Happypig375 avatar Sep 26 '17 14:09 Happypig375

So performance is your top priority? Is "performance" speed or memory usage?

Accuracy is my top priority but since I use the symbolic layer in other functions, integrals, derivatives, etc., and I don't really know where I'm going to stop development, I'd prefer to keep the core lean.

Did I misunderstand this line?

I'm not disputing your claim. I simply disagree that it's a bug. My understanding of a bug is that the output is invalid.

jiggzson avatar Sep 26 '17 19:09 jiggzson

My understanding of a bug is that the output is invalid.

I think that a bug is that the result is incorrect (including invalid) or an unexpected throw occurs. In this case, divide is supposed to return the the expression with the most simplified form. (-15+3*x)*(-30+x+x^2)^(-1)+1 =(-15+3*x)/(-30+x+x^2)+1 =(3(x-5))/((x-5)(x+6))+1 =3/(x+6)+1

It is not (x+9)/(x+6), but either way, the result is still not in the most simplified form.

Happypig375 avatar Sep 27 '17 09:09 Happypig375

I'd prefer to keep the core lean.

You can split some functions into another new module.

Happypig375 avatar Sep 27 '17 09:09 Happypig375

Accuracy is my top priority

I would also like to see #196 and #221 implemented.

I don't really know where I'm going to stop development

You are going to stop developing what?

Happypig375 avatar Sep 27 '17 10:09 Happypig375

@Happypig375, this issue belongs under #322. Would you agree? Either that or we have to pick a better name since I keep overlooking this issue.

jiggzson avatar Dec 24 '17 20:12 jiggzson

Hmm... What about "use cases for #350"?

Happypig375 avatar Dec 25 '17 00:12 Happypig375