Message Boards Message Boards

0
|
3499 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Is it possible to get "*" operators in the results of W|A?

Posted 3 years ago

Hello, I solve implicit equations and sometimes the results are somewhat lengthy. (The question is about Wolfram Alpha)

Example: solve ((x2-x0)^2+(y2-y0)^2) = ((x1-x0)^2+(y1-y0)^2)=y0^2 for x0,y0 (Calculating the center (x0,y0) of a circle through 2 points (x1,y1),(x2,y2) tangentially touching the x-axis)

I use the resulting formulas in C++ and Pascal.

The "*" multiplication operators are missing and I must add them manually or write a utility to do this. Is there a ready made solution for this?

POSTED BY: Peter Heckert
4 Replies

Yes, thank you. My Idea was, possibly someone has written and published a utility for this. If not, I hope to write one myself,shouldnt be too difficult. I added Wolfram Alpha to my original post, in hope to clarify. I was not aware about this ambiugity.

POSTED BY: Peter Heckert
Posted 3 years ago

I'm very sorry. I didn't realize you were using WolframAlpha. I watch carefully for any indication that WolframAlpha is being used and try to respond appropriately. When I didn't realize what you were using I responded with an answer that applies to Wolfram Mathematica.

WolframAlpha understands the word InputForm by itself and gives the definition, but doesn't seem to be able to apply that to expressions.

I can't think of any other way to do this within WolframAlpha, but I will think about this and experiment and see if I can find anything. And perhaps someone else can think of a way to do what you need. I think I remember recently that someone mentioned a way to ask the WolframAlpha team questions. You might be able to find that if you looked through some of the questions.

POSTED BY: Bill Nelson

Thank you, I am not sure this is the answer, because what I want are multiplication operators in the plain text result. In Wolfram Alpha I get for example as solution no. 4:

x0 = (-sqrt(y1 y2 (x1^2 - 2 x1 x2 + x2^2 + y1^2 - 2 y1 y2 + y2^2)) - x1 y2 + x2 y1)/(y1 - y2) and y0 = (2 x1 sqrt(y1 y2 (x1^2 - 2 x1 x2 + x2^2 + y1^2 - 2 y1 y2 + y2^2)) - 2 x2 sqrt(y1 y2 (x1^2 - 2 x1 x2 + x2^2 + y1^2 - 2 y1 y2 + y2^2)) + x1^2 y1 + x1^2 y2 - 2 x1 x2 y1 - 2 x1 x2 y2 + x2^2 y1 + x2^2 y2 + y1^3 - y1^2 y2 - y1 y2^2 + y2^3)/(2 (y1 - y2)^2) and y1 - y2!=0 and y1!=0

If there where "*" operators, I could paste this code into my program, refactor it (if necessary) and use it directly. Not the length is my problem, this is unavoidable; The problem is I have to add all "*" operators.

POSTED BY: Peter Heckert
Posted 3 years ago

Try

InputForm[Solve[((x2-x0)^2+(y2-y0)^2)==((x1-x0)^2+(y1-y0)^2)==y0^2,{x0,y0}]]

or

InputForm[Simplify[Solve[((x2-x0)^2+(y2-y0)^2)==((x1-x0)^2+(y1-y0)^2)==y0^2,{x0,y0}]]]
POSTED BY: Bill Nelson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract