mcandril
Reputation
338
Top tag
Next privilege 500 Rep.
Access review queues
 Jun21 awarded Benefactor Jun19 awarded Teacher Jun19 awarded Editor Jun19 revised Solution for equation system with piece-wise defined functions added 46 characters in body Jun19 answered Solution for equation system with piece-wise defined functions Jun15 comment Solution for equation system with piece-wise defined functions It does not consider the else case of Piecewise, does it? Then, I am not quite sure how to differentiate if the submitted function is defined piecewise. And finally, I would really like to know how I got conditional answers from Solve (or NSolve, not sure) that one time, because that Solution would be much cleaner. Jun15 comment Solution for equation system with piece-wise defined functions No, I definitely need piecewise defined functions. Strictly speaking, this is exactly on of the cases (but not the only one), where I need this function. Want I am trying to do is writing a Module, where you input a "surface" and the starting point and direction of a light beam, and it calculates the light path upon potentially multiple reflection. All in 2D, so curves are enough. Jun15 awarded Promoter Jun15 comment Solution for equation system with piece-wise defined functions I would prefer a general solution, but if nothing else comes, I am willing to give the bounty to an answer that solves the problem for the case where one curve is a straight line and only the other curve is arbitrarily continuous. Also, the first crossing point in a given direction from a defined point on the line would be enough. Jun5 comment Solution for equation system with piece-wise defined functions Hm, this does not consider the "else" case of the Piecewise and it makes the whole thing specific to Piecewise functions. I don't fully understand 1) Why my code does not work, especially numerically and 2) What I did successfully yesterday. Unfortunately I deleted the test code, integrated this into a module and now it stopped working. Jun5 asked Solution for equation system with piece-wise defined functions Jun5 awarded Commentator Jun5 comment Derivative from the left and right Great, I thought so :) My functions are not two crazy, mostly piecewise defined straight lines or short polynominals, so both ways should work just fine. Jun5 accepted Derivative from the left and right Jun4 comment Derivative from the left and right I think this should do the trick, thanks. Jun4 comment Struct equivalent in Mathematica? This answer is basically what I also do, when working with models in different situations. However, I am often facing one problem: Some values may depend on other values (for example lambda->512, k->2 Pi/lambda). As they may not ALWAYS depend on those values, I cannot integrate them into the model. Until now I just cascade lists of rules, but that is not very convenient. Any ideas? Jun4 asked Derivative from the left and right May23 comment Shaping/simplifying equations in a certain way Although it does not seem to be the way to go, this was an interesting thing to learn. Thanks May23 comment Shaping/simplifying equations in a certain way Oh :) I just looked at "Options" :) Thanks again that made a huge difference again. May23 accepted Shaping/simplifying equations in a certain way