microsoft / calculator

Windows Calculator: A simple yet powerful calculator that ships with Windows
MIT License
29.22k stars 5.27k forks source link

Allow for defining new functions in terms of previously defined functions in graphing mode #1048

Open SubjunctiveQuaver opened 4 years ago

SubjunctiveQuaver commented 4 years ago

Problem Statement

A major use in defining functions is for using them to define further functions. This would be useful for visualising, explaining and manipulating composite functions, a major concept in mathematics that spans all disciplines, and is often a barrier for students. Currently, we cannot refer to previously defined functions when defining new ones in graphing mode; the function names are treated as constants.

Evidence or User Insights

Implementing this would enable students and users of the graphing calculator to define functions in terms of other existing functions. This is presently a feature on most, if not all, competitor apps, such as Desmos, GeoGebra and handheld graphing calculators, and is an important way to quickly define families of functions and view them simultaneously.

Currently, if we define the function with rule and attempt to define , we get a slider for "f_1" appearing, set to 1, which means it is treated as a constant, and what is displayed for is really the graph of , where . This would not be expected behaviour. See this for current behaviour:

image

Proposal

Say we have defined, as above, the function with rule . Then if we define , the calculator realises that refers to "3 times composed with the exponential function" is the intended interpretation.

Then the result that is graphed is that of , as one would expect.

To help achieve this, it would also be good to allow for functions to be named something other than just for positive integers k; for instance, the letters f, g, h, p, q, r etc. could be interpreted as function names in the right context, where they haven't been previously assigned as a constant.

Functions could also be renamed by clicking on the function name after entry. (Another wish is that you would be able to save/share a graphing screen for later use to an editable file, but that's for another suggestion.)

Goals

Low-Fidelity Concept

See the Desmos implementation:

image

Of course, the existing Calculator UI would be retained, but with the graphing output as in the screenshot. This is a mock-up in the Calculator app, but with the desired output of defined manually in :

image

Requested Assignment

I'm just suggesting this idea. I don't want to implement it.

MicrosoftIssueBot commented 4 years ago

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

ghost commented 4 years ago

This pitch looks like it has everything it needs for review. In the meantime, we'll keep this idea open for discussion so the community has the chance to provide feedback. Check out our New Feedback Process for more info on the user-centered process we follow for new feature development.

ghost commented 4 years ago

We reviewed the pitch and would love to explore this idea further! The pitch is a great start, but there are still some open questions. I am moving this issue into planning to iron out some of those details and I created calculator-specs/graphingFunctions to track progress. A human will follow up with some feedback on your pitch shortly. Keep in mind that not all ideas that make it into the planning phase are guaranteed to make it to release. For more information on next steps, check out our spec workflow.

grochocki commented 4 years ago

@SubjunctiveQuaver Thank you for your detailed submission! We think this is a great idea that adds a lot of value to the new graphing mode. The UI seems like it would be straightforward to implement, but we believe there might be prerequisite work in the graphing engine, and while the UI is part of this repository, the proprietary Microsoft-built graphing engine, which also drives graphing in Microsoft Mathematics and OneNote, is not. We will need to coordinate with our internal partners to investigate how best to incorporate this functionality into the graphing engine before moving forward with implementing this feature.

mattjes commented 7 months ago

bump

Krzycho666 commented 2 months ago

bump