Community RSS Feed
http://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag Equation Solving sorted by activeHow to simplify (use variables) and plot this summation?
http://community.wolfram.com/groups/-/m/t/1076864
I'd like to simplify this equation by using variables. For some reason I can't get the right order and way to define them:
sum Part[IntegerDigits [b, 10], i+1] * (10^i+10^(Length[IntegerDigits [b, 10]]-1-i)), i = 0 to Length[IntegerDigits [b, 10]]-1
I have tried this:
a=IntegerDigits [b, 10], k=Length[a]-1, sum Part[a, i+1] * (10^i+10^(k-i)), i = 0 to k
but without success.
Then for some reason equation doesn't give right solution with free b variable. WolframAlpha claims it is: 11 (b + 10)
But with set variable b=153 calculation is correct: 504:
[https://www.wolframalpha.com/input/?i=b%3D153,+sum+Part%5BIntegerDigits+%5Bb,+10%5D,+i%2B1%5D+*+(10%5Ei%2B10%5E(Length%5BIntegerDigits+%5Bb,+10%5D%5D-1-i)),%C2%A0+i+%3D+0+to+Length%5BIntegerDigits+%5Bb,+10%5D%5D-1][1]
Thanks for any help provided,
-Marko
[1]: https://www.wolframalpha.com/input/?i=b=153,%20sum%20Part%5BIntegerDigits%20%5Bb,%2010%5D,%20i%2b1%5D%20*%20%2810%5Ei%2b10%5E%28Length%5BIntegerDigits%20%5Bb,%2010%5D%5D-1-i%29%29,%C2%A0%20i%20=%200%20to%20Length%5BIntegerDigits%20%5Bb,%2010%5D%5D-1Marko Manninen2017-04-28T18:56:07ZCreate a Step-by-step equation solver API?
http://community.wolfram.com/groups/-/m/t/1071854
Ok, the idea seems very weird...I know. I'm a very big noob at Mathematica, I downloaded it 2 weeks ago, but I think that's the most awesome software on earth. Anyway, I know that it's possible to get [Step-by-step solution][1] using Wolfram Alpha like this: `WolframAlpha["x^2=x+1"]`
And I also know that it's possible to deploy an API using the [Cloud Deploy][2] function, but I would like to create an API that when you input: `?q=x^2==x+1` returns a JSON array like this:
{
"1": {
"text": "Solve for x over the real numbers:",
"expression": "x^2==x+1"
},
"2": {
"text": "Subtract x+1 from both sides:",
"expression": "x^2-x-1==0"
},
"3": {
"text": "Add 1 to both sides:",
"expression": "x^2-x==1"
},
"4": {
"text": "Add 1/4 to both sides:",
"expression": "x^2-x+1/4==5/4"
},
"5": {
"text": "Write the left hand side as a square:",
"expression": "(x-1/2)^2==5/4"
},
"6": {
"text": "Take the square root of both sides:",
"expression": "x-1/2==Sqrt[5]/2 or x-1/2==-(Sqrt[5]/2)"
},
"7": {
"text": "Add 1/2 to both sides:",
"expression": "x==1/2+Sqrt[5]/2 or x-1/2==-(Sqrt[5]/2)"
},
"8": {
"text": "Add 1/2 to both sides:",
"expression": "x==1/2+Sqrt[5]/2 or x==1/2-Sqrt[5]/2"
}
}
Or something like this. I know that's it's ambitious, and I don't expect something with tons of options, as I said, I want something simple (if it's possible to do of course :) ). Thank you for taking your time reading my question, and I hope it's possible to do. You can see this as a challenge ;)
[1]: https://mathematica.stackexchange.com/questions/148/get-a-step-by-step-evaluation-in-mathematica
[2]: https://www.wolfram.com/language/fast-introduction-for-programmers/en/cloud-deployment/Arthur Guiot2017-04-25T11:20:34Z