1
$\begingroup$

I'm trying to study the sign of an expression, having information on some of my parameters. I don't know how to code these conditions. For example, I want to know when this expression:

k (2(a'[x])^2 - a[x]a''[x]) / (a[x]^2) 

is positive given that k > 0, x > 0 and that my function a is positive and increasing for all x > 0 (k is a constant, a is a function)

So basically, since a''[x] is the only term of the equation that I don't know anything about, I want Mathematica to give me:

(* a''[x] < a'[x]^2/a[x] *)
$\endgroup$
5
  • $\begingroup$ Elsa, welcome to Mathematica.SE. Please use backticks to format your code so that your question is more readable; see mathematica.stackexchange.com/editing-help#code $\endgroup$
    – Mr.Wizard
    Commented May 2, 2014 at 5:50
  • $\begingroup$ @Elsa I did not clearly understand, what is your aim. Think about adding an example of a function in question along with the answer in the form you wish it to be. You can do it using the option "edit" below your question. $\endgroup$ Commented May 2, 2014 at 7:07
  • $\begingroup$ Hello Elsa, my apologies that your edit went unnoticed and you had to wait so long... I've formatted the question a bit and reopened it :) I've also changed " to '' since " is used only for strings and it looks like you meant the second derivative. Please also clarify if k here is a function or just a quantity. Your usage of [], when interpreted as Mathematica syntax indicates that k is a function, but if interpreted purely as a grouping, then perhaps not. $\endgroup$
    – rm -rf
    Commented May 19, 2014 at 23:06
  • $\begingroup$ Hello, thank you so much for your edit! (indeed, I meant the 2nd derivative and k is just a quantity). Cheers $\endgroup$
    – Elsa
    Commented May 20, 2014 at 0:20
  • $\begingroup$ Ok this is good enough actually, thank you. Is there any way I wouldn't have to repeat k>0 in every function but settle it beforehand? (I tried different things on the same idea as testParam = {k -> 3}but it doesn't work with inequalities) $\endgroup$
    – Elsa
    Commented May 20, 2014 at 18:00

1 Answer 1

1
$\begingroup$

Questions need to be answered, so I guess I will shoot:

Reduce[k (2 (a'[x])^2 - a[x] a''[x])/(a[x]^2) > 0 && k > 0]

$a'(x)\in \mathbb{R}\land \left(\left(a(x)<0\land a''(x)>\frac{2 a'(x)^2}{a(x)}\land k>0\right)\lor \left(a(x)>0\land a''(x)<\frac{2 a'(x)^2}{a(x)}\land k>0\right)\right)$

which is the result that you expected.


Regarding your comment:

Is there any way I wouldn't have to repeat k>0 in every function but settle it beforehand?

You can do:

assum = k > 0;
Reduce[k (2 (a'[x])^2 - a[x] a''[x])/(a[x]^2) > 0 && assum]
$\endgroup$
1
  • $\begingroup$ That's awesome! thank you $\endgroup$
    – Elsa
    Commented May 20, 2014 at 22:51

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.