1
$\begingroup$

I need to put a condition for b inside p01, p02 definitions or just state this condition at the beginning of my problem.

p01[x_] := 2*h[2]/κ*Log[(x - b)/(-b)] + θ[2]/κ*x + 1/2;
p02[x_] := 2*h[2]/κ*Log[(x - b)/(1 - b)] + θ[2]/κ*(x - 1); 
forh2[x_] = Integrate[p01[x], {x, 0, b}] + Integrate[p02[x], {x, b, 1}] - M*g;
fortheta2[x_] = Integrate[(x - b)*p01[x], {x, 0, b}] + Integrate[(x - b)*p02[x], {x, b, 1}];

When executing, for h2 and fortheta2, I get lots of conditions related to b. I know it does complain about Log[1/-b]. In my physical problem 0<b<1 . How can I add this condition so that forh2, fortheta2 make sense.

$\endgroup$

1 Answer 1

2
$\begingroup$

You can use Assumptions with Integrate

Integrate[p01[x], {x, 0, b}, Assumptions -> b > 0]

(4 (1 + b) h[2] Log[1 + b] + b (κ - 4 h[2] + b θ[2]))/(2 κ)

You have to set those conditions by yourself for each Integrate.

$\endgroup$
8
  • $\begingroup$ Thanks @Sumit. So, I cannot define 0<b<1 where b is real?? $\endgroup$
    – Meva
    Commented Oct 13, 2016 at 14:00
  • $\begingroup$ you can do that for p01. I think that would not be sufficient for integrating p02. $\endgroup$
    – Sumit
    Commented Oct 13, 2016 at 14:10
  • $\begingroup$ No, I was mentioning about b being Real. I put another Assumptions, but it did not work. $\endgroup$
    – Meva
    Commented Oct 13, 2016 at 14:40
  • $\begingroup$ When you say 0<b<1 you are already saying that b is real as the defining region itself is real. $\endgroup$
    – Sumit
    Commented Oct 13, 2016 at 14:57
  • $\begingroup$ Sorry for that question, you are right @Sumit. I still get a condition when I execute forh2, stating b<=1/2 which should not be. $\endgroup$
    – Meva
    Commented Oct 13, 2016 at 15:00

Your Answer

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

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