finding values of implicit function of 3d

3 views (last 30 days)
shathy Khan
shathy Khan on 8 Jan 2023
Commented: shathy Khan on 9 Jan 2023
This question was flagged by Star Strider
If t and x are independent variables and u(t,x) dependent variable. how can I calculate u(t,x) at different positions of t and x for implicit function
b^{u(t,x)}*[ux/e*u(t,x)]^{vt/2}=b^{x/2}. t and x both are vectors.
nx=2; nt=3;
a=0; b=10; T=3; %in sec 3 min or 180 sec
shathy Khan
shathy Khan on 9 Jan 2023
I am extremely sorry. Actually I am very new in this site and both questions are not same, vectors matter. And when I wrote the equation I didn't maintain the matlab code. I just Write it as usual. sorry I was wrong. If possible please help me. Thank you.
The answer to the first question I asked was really acceptable. But I couldn't match for vector.

Sign in to comment.

Answers (1)

John D'Errico
John D'Errico on 8 Jan 2023
Edited: John D'Errico on 8 Jan 2023
So you have the relation:
a=0; b=10; T=3;
e = exp(1);
ux = 90;
v = 70;
syms u t x
b^u*(ux/e*u)^(v*t/2) == b^(x/2)
ans = 
(Please learn to use MATLAB syntax, rather than sprinking various type of parens and braces through an expression.) Even with that, I had to guess in several places what you actually intended.
I am not terribly sure if this sub-expression
is actually intended to mean
[ux / (e*u(t,x)) ]
That is, is u(t,x) in the numerator there, or the denominator? Im not really sure, so I'll assume you intended what you actually wrote.
I'll also assume that vt is just v*t, not another undefined variable.
Regardless, solve from the symbolic toolbox should be able to handle this, but it seems to get stuck. You have many powers of 10 in there, so suppose I take the log base 10 of each side? That will reduce to
u + log10(ux/e*u)*(35*t) == x/2
ans = 
usol = solve(u + log10(ux/e*u)*(35*t) == x/2,u)
usol = 
The script w in there is the Wright-omega function. It always appears in this kind of problem. As well, see that when MATLAB just writes log, it means the NATURAL log, not log to the base 10.
help sym/wrightOmega
WRIGHTOMEGA Symbolic Wright Omega function. WRIGHTOMEGA(x) computes the Wright omega function of x. WRIGHTOMEGA(A) computes the Wright omega function of each element of A. Reference: Corless, R. M. and D. J. Jeffrey. "The Wright omega Function." Artificial Intelligence, Automated Reasoning, and Symbolic Computation (J. Calmet, B. Benhamou, O. Caprotti, L. Henocque, and V. Sorge, eds.). Berlin: Springer-Verlag, 2002, pp. 76-89. Documentation for sym/wrightOmega doc sym/wrightOmega
Again, this requires I have interpreted your original expression properly. But there is a solution in any case.
You can evaluate that expresion as a function of t and x now.
u_tx = matlabFunction(usol)
u_tx = function_handle with value:
u_tx(T/2,(a+b)/2) % in the middle of the range for t and x
ans = 0.0337
fsurf(u_tx,[0 T a b])
xlabel t
ylabel x
zlabel u
Note that this solution probably returns only one branch of the solution. Like a sqrt, there would probably be at least one other branch, as shown in the alternative soltuiions you got the other time you asked this question.
If you now wish to evaluate the function at a grid of points for t and x, you can easily do so now. As you can see, I just plotted the surface. Again, note that this is only the primary solution to a problem where the solution may not be unique.




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!