How can I solve derivative with restrictions/bounds on variable
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi so essentially I want to solve the derivative of a function. I am currently getting an error as follows: "Unable to find explicit solution"
I am trying to find the variable 'f' which is unknown. I know sigma1 and all other variables are assigned numbers, however I don't know what z is.
I am assuming because my function is a tad complicated, it might be a good idea to restrict the possible values of z. I know z has to be positive and must be less than another L.
Here is a an example of my code thus far.
CC=[1 1 1 1;exp(-w1*L) exp(w1*L) exp(-w2*L) exp(w2*L);-w1 w1 -w2 w2;-w1*exp(-w1*L) w1*exp(w1*L) -w2*exp(-w2*L) w2*exp(w2*L)]^-1*[0;f;0;0];
C1=CC(1); %% This is equal to (5536113736801657*f)/72057594037927936
C2=CC(2);
C3=CC(3);
C4=CC(4);
Sigma1 = -(1/2)*D/A + C1*exp(-w1*z)+C2*exp(w1*z)+ C3*exp(-w2*z)+C4*exp(w2*z);
dSigma1 = diff(Sigma1, z);
solve(dSigma1, z)
Edit: I have tried solve(dSigma1>0,dSigma1<L,z) still not working :/
0 commentaires
Réponses (1)
Navya Seelam
le 23 Juil 2019
Hi,
You can use “assume” function to restrict the values of z
assume(z>0 & z<L);
Moreover, if you are trying to find variable ‘f’ use solve (dSigma1, f) instead of solve(dSigma1,z)
For more details on “assume” check the link below
0 commentaires
Voir également
Catégories
En savoir plus sur Matrix Indexing 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!