I am tackling a problem which uses lots of equations in the form of:

enter image description here

where $q_i(x)$ is the only unknown, $c_i$, $C_j$, $P_j$ are always positive. $C_j < P_j$ for all $j$

1.How is this type of problems efficently solved especially when the number of iterations $N$ is between 20 - 100?

What I was doing is $q_i(x) - c_i(x)$ must be equal to the summation of integers. So i was doing an exhaustive search for $q_i(x)$ which satisfies both ends of the equation. Clearly this is computationally exhaustive even if I do the search on a parallel computer..

2.What if $c_i(x)$ is a floating point number, this will even make the problem even more difficult to find a real $q_i(x)$?



This can be done numerically, making use of Maple. For example, the Maple code $$restart; Digits := 25: f := x-> Student[Calculus1]:-Roots(q[i]-3*x-add(floor(q[i]/(j+1))*j, j = 1 .. 25)): f(.12); $$ outputs $[ 0.36, 3.36] $. The plot $$plot(q[i]-3*.12-add(floor(q[i]/(j+1))*j, j = 1 .. 25), q[i] = 0 .. 5, discont = true) $$ enter image description here

confirms that. See Roots for info.

  • $\begingroup$ Thanks. But Matlab roots does not work with floor and ceil functions. $\endgroup$ – The Byzantine Aug 1 '14 at 2:01
  • $\begingroup$ @ The Byzantine : The roots command of MATLAB finds the roots of a polynomial only. It seems you try to use it in a wrong way. $\endgroup$ – user64494 Aug 1 '14 at 5:03
  • $\begingroup$ I did not even attempt to use it because i know that fact. That what I meant when i said it wont work with floor and ceiling. $\endgroup$ – The Byzantine Aug 1 '14 at 15:46

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.