Timeline for How to define a real positive variable in mathematica
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 4, 2017 at 19:04 | comment | added | jkuczm | Related: How to tell Mathematica that the argument of a function is real? | |
Jun 2, 2017 at 21:34 | vote | accept | John Taylor | ||
Jun 2, 2017 at 17:04 | comment | added | Michael E2 |
Depending on what computation you're doing, the answer might be there isn't a (convenient) way. Mathematica applies $Assumptions sparingly, for instance, whenever Simplify is called and functions that have an Assumptions option. I don't think you can get M to automatically simplify Sqrt[x^2] to x (barring overriding Power ). You would have to use something like Simplify to get the assumptions to have the desired effect. Often that is sufficiently acceptable.
|
|
Jun 2, 2017 at 16:52 | answer | added | ivbc | timeline score: 9 | |
Jun 2, 2017 at 16:47 | history | edited | David G. Stork | CC BY-SA 3.0 |
added 14 characters in body
|
Jun 2, 2017 at 16:44 | comment | added | ivbc | Assuming[x>0,f[x]] should solve your problem. You could also use $Assumptions command. | |
Jun 2, 2017 at 16:31 | history | asked | John Taylor | CC BY-SA 3.0 |