I was having a problem (a mathematical one) in my research, and tried to find the solution. I had some ideas, but none of them solved my problem, I did some research but found nothing, tried to talk with my advisor too (mathematics is not his field), without success. I was stuck in this part. Therefore, I decided to reframe the problem and ask in Quora for help. Within 2 days I received some answers, one that I already have considered but did not helped me, and another that I had previously considered too, but extended.
I implemented the second answer using my problem constraints and needs and it worked, worked better than the state of art for this particular problem (using of course the rest of my job). Intrigued, I asked how the Quora guy (a mathematical professor) found the solution, he said that it was pure logical intuition and little bit of statistics. Later I searched if it was a published solution and found a similar, but not identical solution, buried inside a part of an algorithm in a published paper.
I told my advisor that I had found the solution, but did not mentioned Quora or the paper, he did not asked me either how I found the solution. Now I am considering to use this solution, found on Quora, as part of my research (With intent to be published), but how should do this? If I do not mention Quora could I be in risk of being accused of plagiarism? Should I point the name of the Quora professor in a "thank you footnote" or cite the Quora answer? Should I use as reference the published paper?
Note: I know that I should talk with my advisor about this, I will. But first I need some arguments on how to present the idea to him.
Any informed help would be appreciated.