# How to define second derivative in symbolic

104 visualizzazioni (ultimi 30 giorni)
Anas Zh il 7 Apr 2022
Commentato: Star Strider il 7 Apr 2022
AA, I have a project to derive some equations that defined in symbolic variables. For example, r= cos(A), I want the symbolic system show me a result that dr/dA = -sin(A)*(dA/d) as A has derivatives values dA/d and so far for d²A/d² If I want the second derivative of r.
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Risposta accettata

Star Strider il 7 Apr 2022
Use the symbolic diff function —
syms A
r(A) = cos(A)
r(A) =
D1r = diff(r)
D1r(A) =
D2r = diff(r,2)
D2r(A) =
.
##### 6 CommentiMostra 4 commenti meno recentiNascondi 4 commenti meno recenti
Anas Zh il 7 Apr 2022
Thank you a lot
Star Strider il 7 Apr 2022
As always, my pleasure!

Accedi per commentare.

### Più risposte (1)

Mohammed Hamaidi il 7 Apr 2022
dr/dA = -sin(A)*(dA/d)
d²r/dA² = -cos(A)*(dA/d)^2-sin(A)*d²A/d²
##### 3 CommentiMostra 1 commento meno recenteNascondi 1 commento meno recente
Mohammed Hamaidi il 7 Apr 2022
What is A?
Anas Zh il 7 Apr 2022
Any variable, it doesn't matter

Accedi per commentare.

### Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by