![]() | 1 | initial version |
Hi
I propose this workaround not quite satisfactory (w2 is out of place)
from sage.manifolds.utilities import set_axes_labels
w, w1, w2, p, a = var('w w1 w2 p a')
U(w, a) = w^a # La fonction doit être fonction de ses variables et paramètres
a = 0.6
p = 0.5
f = p * U(w1, a) + (1 - p) * U(w2, a)
G = plot3d(f, (w1, 1e-4, 5), (w2, 1e-4, 5), frame=False, color='wheat', opacity=0.6)
G += arrow3d((0, 0, 0), (5, 0, 0), color='green')
G += arrow3d((0, 0, 0), (0, 5, 0), color='green')
G += arrow3d((0, 0, 0), (0, 0, 3), color='green')
G += text3d("$U(w) = w^a$", (1, 2, 3), color=(0.5, 0, 0))
G += set_axes_labels(G, 'w1','w2','U', color='green', fontweight='bold')
show(G,viewer='threejs',frame=True)
contour_plot(f, (w1, 0, 5), (w2, 0, 5))