How can i solve and input this problem
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
e^x=8x-4 in MATLAB. It says to find all real solutions.
3 commentaires
Star Strider
le 5 Juil 2022
One option is:
syms x
f = exp(x) == 8*x-4
xval = solve(f)
I leave the rest to you!
.
Image Analyst
le 13 Juil 2022
Original question (I think) in case he edits it away like some others:
e^x=8x-4 in MATLAB. It says to find all real solutions.
Réponses (2)
Mann Baidi
le 5 Juil 2022
Hi Nathaniel,
If you want to find the real solutions of a equation, we can use the function solve()
For the above equation, the code for finding the real solutions should be :
syms x % Declare x as variable in the equation
eqn= exp(1)^x==8*x-4; % State the equation exp(1) denotes e
sol= solve(eqn,x,'Real',true); % using the solve function and keeping real as true
disp(sol); % sol are the real solutions of the equation
0 commentaires
Sam Chak
le 5 Juil 2022
Hi @Nathaniel
I use a different example, 
so that you can try to work on the solution yourself.
fun = @(x) exp(x) - (6*x.^2 - 3);
fplot(fun, [-1 5], 'linewidth', 2), grid on, xlabel('x')
x0 = -1;
xsol1 = fzero(fun, x0)
x0 = 1.5;
xsol2 = fzero(fun, x0)
x0 = 5;
xsol3 = fzero(fun, x0)
0 commentaires
Voir également
Catégories
En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
