My main problem is to generate a manipulatable 3D plot, combining three functions and two of those functions depend on another variable Theta (which shall be the manipulateable variable). To explain it in detail:
I have two functions, which depend on the variable Theta. The variable Theta shall later be the factor which can be manipulated. So at first I defined two functions (kbA and kbM), which depend on this variable:
No. 1)
CPA[ϕ_, α_, β_, δ_, x_, ρ_, θ_, kM_] :=
cA[t]*ϕ*(α kA^(α - 1) + β kM^(β - 1) - δ - ρ - x θ)/θ
kbA = kA /. Flatten@Solve[
CPA[0.5, 1/3, 2/3, 0.05, 0.02, 0.01, θ, 500] == 0.0, kA]
No. 2)
CPM[ϕ_, α_, β_, δ_, x_, ρ_, θ_, kA_] :=
cM[t]*(1 - ϕ )*(α kA^(α - 1) + β kM^(β - 1) - δ - ρ - x θ)/θ
kbM = kM /. Flatten@Solve[CPM[0.5, 1/3, 2/3, 0.05, 0.02, 0.01, θ, 500] == 0.0, kM]
Those two functions (kbA and kbM) depend on Theta. (The results, kA* and kM*, of these functions theoretically define two coordinate values for a line plot I need later).
To generate the 3D plot I have a third function which looks like this:
KP[α_, β_, δ_, x_, n_] := -c[t] - (n + x + δ) ( kA + kM) + (kA^α +
kM^β)
cfun = c[t] /. Flatten @ Solve[KP[1/3, 2/3, 0.05, 0.02, 0.01] == 0.0, c[t]]
p3 = Plot3D[cfun, {kA, 0, 50}, {kM, 0, 1500}, AxesLabel -> {"Capital A \!\(\*SubscriptBox[OverscriptBox[\(k\), \\(^\)], \(A\)]\)",
"Capital M \!\(\*SubscriptBox[OverscriptBox[\(k\), \(^\)], \(M\)]\\)", "Consumption \!\(\*FormBox[OverscriptBox[\(c\), \(^\)],TraditionalForm]\)"}]
Now I have my 3D plot p3 based on the function cfun. Into this 3D plot, I want to insert a lineplot, whose coordinates are the two results of KbA and kbM (and third coordinate is 1, because the line plot is parallel to the y-axis "consumption"). But kbA and kbM depend on Theta. And this variable Theta shall be manipulateable, in a graph.
But now I have the problem, to combine the results of kbA and kbM in a function or something else and to integrate it afterwards into the 3D plot! I don't know what I can do or should do, to solve my problem.. How can I say/define, that every value/result of kbA and KbM for the same value of Theta build the coordinates for the line plot i want to integrate in the 3D plot?
Can somebody help me? And even can tell me, how I can write the command/input for a mnipulation of Theta or rather of the final 3D plot?
So the main question is: How can I define/makte this line in the 3D plot manipulatable with respect to Theta? So that I change the value of Theta (i.e. with a control in the Manipulate expression) and the line moves inside the 3D plot?
I saw that the graphic wasn't shown. So here are the commands to solve it..
kbA3 = kbA3 /. Flatten@Solve[CPA[0.5, 1/3, 2/3, 0.05, 0.02, 0.01, 3.0, 500] == 0.0, kA]
kbM3 = kbM3 /. Flatten@Solve[CPM[0.5, 1/3, 2/3, 0.05, 0.02, 0.01, 3.0, 500] == 0.0, kM]
KP3[α_, β_, δ_, x_, n_, kA_, kM_] :=
-c[t] - (n + x + δ) ( kA + kM) + (kA^α + kM^β)
c3 = c[t] /. Flatten@NSolve[KP3[1/3, 2/3, 0.05, 0.02, 0.01, kbA3, kbM3] == 0.0, c[t]]
SS = Show[p3, Graphics3D @ { Line[{{kbA3, kbM3, 0}, {kbA3, kbM3, 24.0}}] } ]
kbA3
,kbM3
andKP3
in your question. just return those variables. I recommend you just give the exact form of these functions in your question, and leave out all the Solve bits. $\endgroup$