From: anderson gomes on
hi,

I'm working on a school project in which I have to find the maximum profit for a simple profit function based on how much I want to spend in advertisement.

I'm using the following code:
----------------------------------------------
clear
reset(symengine)

syms c real
b1 = sym('b1','positive');
spend = sym('spend','positive');
marg = sym('marg','positive');

fh = @(g) marg * exp(c + b1 * log(spend )) - spend ;
diff_spend = diff(fh,spend);

[X] = solve(diff_spend,spend)

----------------------------------------------

The answer I get is:
-------------------------------
[X] = solve(diff_spend,spend)
Warning: Explicit solution could not be found.
> In solve at 81

X =

[ empty sym ]
-------------------------------


Manualy we can calculate, but we are unable to make matlab give us an optput based on spend.

Can anyone help me?