-1
$\begingroup$

I was wondering if you can help. I have a set of equations I need to solve for a list of parameters; entering each parameter value and solving anew each time is simply not economical.

I found a way to vary the parameter and have Mathematica solve the equation, but the calculation now takes extremely long and does not even return a solution. Here is my code below (very simple):

enter image description here

What am I doing wrong? What can be done to make the calculation faster?

Thank you in advance!

$\endgroup$
2
  • $\begingroup$ Please put properly formatted code in your question. Read the help for instructions. $\endgroup$
    – ciao
    Apr 12, 2014 at 5:48
  • $\begingroup$ Still no proper Mathematica code. :( $\endgroup$
    – Jinxed
    Mar 25, 2015 at 18:08

1 Answer 1

2
$\begingroup$

Combined symbolic and numeric calculation can be hard to deal with. You may do the symbolic part first and then do the substitution, or do the pure numeric integration NItegrate many times.

Integrate[(n3 + 
s^2/(2 r))*(c e n)/(g r^(2/3) (s/lb (end - beg) + beg)^(4/3)), {s, 0, lb}][[1]]

Output:

(3 c e lb n (beg^(
   1/3) (5 beg + 6 beg^(2/3) end^(1/3) + 3 beg^(1/3) end^(2/3) + 
     end) lb^2 + 
  10 (beg^(2/3) + beg^(1/3) end^(1/3) + end^(
     2/3))^2 n3 r))/(10 beg^(
1/3) (beg^(2/3) + beg^(1/3) end^(1/3) + end^(2/3))^3 end^(1/3)
 g r^(5/3))
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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