0
$\begingroup$

Pic of CodeSolve function on mathematica not working. I'm doing a large solve function with several hyperbolic trig functions inside, and it just runs forever. Ive let it sit for a day and it still didnt run. Ive also tried adding Reals into the solve function and ive tried using NSolve as well.

    NSolve[{1 == a \[Mu]m (  Sinh[(x10 - xm)/a] + Sinh[(xm - x20)/a]), 
  0 == a Cosh[-x10/a] + y10, 0 == a Cosh[(x2 - x20)/a] + y20, 
  l1 == a Sinh[(xm - x10)/a], 
  l2 == a (Sinh[(x2 - x20)/a] - Sinh[(xm - x20)/a]), 
  a Cosh[(xm - x10)/a] + y10 == a Cosh[(x20 - xm)/a] + y20}, {a, xm, 
  x10, y10, x20, y20}, Reals]
$\endgroup$
3
  • 1
    $\begingroup$ Can you show your code about your attempting? Here we assume you have attempt something and so we can pose your code in our machine and try to help you. $\endgroup$
    – user61054
    Dec 17, 2018 at 1:31
  • 1
    $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$
    – Michael E2
    Dec 17, 2018 at 2:14
  • 1
    $\begingroup$ People here generally like users to post code as Mathematica code instead of just images or TeX, so they can copy-paste it. It makes it convenient for them and more likely you will get someone to help you. You may find this this meta Q&A helpful $\endgroup$
    – Michael E2
    Dec 17, 2018 at 2:14

1 Answer 1

1
$\begingroup$

Not a full answer, but hopefully can help Jason get off of top dead center.

I first broke up the expression into separate equations (using mm)

eqn1 = 1 == a mm (Sinh[(x10 - xm)/a] + Sinh[(xm - x20)/a]);
eqn2 = 0 == a Cosh[-x10/a] + y10;
eqn3 = 0 == a Cosh[(x2 - x20)/a] + y20;
eqn4 = l1 == a Sinh[(xm - x10)/a];
eqn5 = l2 == a (Sinh[(x2 - x20)/a] - Sinh[(xm - x20)/a]); 
eqn6 = a Cosh[(xm - x10)/a] + y10 == a Cosh[(x20 - xm)/a] + y20;

Note that y10 only appears in eqn2. So leave it out to simplify things. Can get it later. Set:

eqns = {eqn1, eqn3, eqn4, eqn5, eqn6};

Now try solving it while setting a -> 1 also, restricting it to Reals, and getting floats

Solve[eqns /.{mm -> 400, l1 -> 3/4, l2 -> 1/2, x2 -> 1, a -> 1},{x10, x20, xm, y10, y20}, Reals]//N

{{x10 -> -0.047155, x20 -> -0.0491538, xm -> 0.645992, y10 -> -1.60123, y20 -> -1.60273}}

Maybe this will get you moving a little?

$\endgroup$
6
  • $\begingroup$ the most important value im getting from this is the "a" value. the way you have it now, it is not solving for a. can you help one last time? $\endgroup$ Dec 17, 2018 at 3:20
  • $\begingroup$ if need be you could let one of the other variables equal something around 1, or xm around -.5 @MikeY $\endgroup$ Dec 17, 2018 at 3:22
  • $\begingroup$ sorry xm is positive. y10 and y20 will be negative .5 ish $\endgroup$ Dec 17, 2018 at 3:34
  • $\begingroup$ Eyeballing the problem, a is a tricky one to solve for. Since you can set a and get a solution, though, you could wrap the whole thing in an iterative solver and drive a from there. Best of luck! $\endgroup$
    – MikeY
    Dec 17, 2018 at 3:37
  • $\begingroup$ what is an iterative solver $\endgroup$ Dec 17, 2018 at 3:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.