Differentiation

4 vues (au cours des 30 derniers jours)
Richard
Richard le 17 Jan 2012
Commenté : Walter Roberson le 20 Déc 2024
Is it possible to construct a code that for example we type in x^2 and then the program finds (d/dx)x^2=0 and gives x=0?
I have tried using syms x; diff(x^2) which gives 2*x but I don't know how to make it solve the equation. Perhaps I have to define a function handle? But f=@(x) diff(x^2) doesn't work.
Please help.

Réponse acceptée

Walter Roberson
Walter Roberson le 17 Jan 2012
solve(diff(x^2))
  1 commentaire
Richard
Richard le 17 Jan 2012
Thanks, Walter! :-)

Connectez-vous pour commenter.

Plus de réponses (2)

Wayne King
Wayne King le 17 Jan 2012
syms x
solve(diff(x^2)==0)
  1 commentaire
Richard
Richard le 17 Jan 2012
Thanks, Wayne! :-)

Connectez-vous pour commenter.


Salama
Salama le 18 Déc 2024
I want to learn differential and integral calculus to help me solve problems in quantum physics.
  2 commentaires
Walter Roberson
Walter Roberson le 18 Déc 2024
Walter Roberson
Walter Roberson le 20 Déc 2024
Integral calculus and differentiation is a large topic. Numerous textbooks have been written on the topic. It is not very related to MATLAB, so asking here is not correct.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by