0
$\begingroup$

I have two functions given as;

u[c_,d_] := Sinh[a b^2 c^2 + 3a b d] and v[c_,d_] := Log[a b^2 c^2 + 3a b d + d^2] - d. I want to find the root of these two functions that maximise another function say w[c_,d_]:= 2a b c + 3b c - 2c d^2 + c*Exp[a+b]. Here, a and b are parameters that lie between [-3,3] and [1,2] respectively, while c and d are the variables of interest. I am able to solve for c and d when I use the FindRoot command and fix a and b (example, a = 1 and b = 0.7).

a=1; b=0.7;
FindRoot[{u[c,d]== 0,v[c,d]== 0},{c,0},{d,0}]

When I do this I get only one root of the problem and as I change the initial point I get one of the other roots and so on. And I am also able to determine the c and d that gives the max of w[c,d]. But this is what I want to do;

I want to be able to estimate c and d over the entire space of a and b and find the point ({c,d}) which maximises w[c,d]. Also, to plot the surface of u[c,d] with the c and d that gives the maximum of w[c,d].

I am new to mathematical and your help is much appreciated.

$\endgroup$
1
$\begingroup$
u[c_, d_] := Sinh[a b^2 c^2 + 3 a b d];
v[c_, d_] := Log[a b^2 c^2 + 3 a b d + d^2] - d;
w[c_, d_] := 2 a b c + 3 b c - 2 c d^2 + c*Exp[a + b];
NMaximize[{w[c, d], u[c, d] == 0, v[c, d] == 0, -3 <= a <= 3, 
  1 <= b <= 2}, {a, b, c, d}]

{98.4569, {a -> 2.99992, b -> 1.14721, c -> 1.35641, d -> -0.703619}}

$\endgroup$
1
  • $\begingroup$ Your response is very helpful. Thank you! $\endgroup$ – BDG Mar 25 at 23: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.