- Differentiate equation 1 with respect to a.
- Use the "simplify" function to simplify the differentiated expression.
- Extract the condition "(sin(b) == sin(a)^3)" from the simplified result.
- Substitute this condition into the original equation 1.
- Simplify the result to get the expression for "P" in terms of a only.
How to substitute value in equation already have
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
P=k*l*cos(a)*(1-(sin(b)/sin(a))) -----------1
sin(a)=sin(b)^3 ---------2
What i have done is differentiated the eq-1 with respect to a and got the eq-2 in form of long variable like ~in(a/pi, 'integer') & (sin(b) == sin(a)^3 | k == 0 | l == 0)
I have used the diff function and then simplify that equation in MATLAB itself and getting this ~in(a/pi, 'integer') & (sin(b) == sin(a)^3 | k == 0 | l == 0
my QUESTION is that
- how I could able to take the only (sin(b) == sin(a)^3 from the simply result
- And after taking it from the simplify function substitute in the equation 1 to get something like P= k*l*cos(a)^3 after everything
thank you
0 comentarios
Respuestas (1)
Vaibhav
el 14 de Feb. de 2024
Hi Ahmad
To extract the specific condition "(sin(b) == sin(a)^3)" from the result of the "simplify" function and then substitute it into equation 1 to simplify the expression for "P", you can follow these steps in MATLAB:
Here's how you can do this in MATLAB:
syms a b k l P
% Define the original equation
P = k * l * cos(a) * (1 - (sin(b)/sin(a)))
% Differentiate P with respect to a
dPda = diff(P, a)
% Simplify the differentiated expression
simplified_dPda = simplify(dPda)
% Assuming you have the condition sin(b) == sin(a)^3 from the simplified result
% Substitute this condition into the original equation for P
P_substituted = subs(P, sin(b), sin(a)^3)
% Simplify the substituted expression for P
simplified_P = simplify(P_substituted)
After running this code, "simplified_P" should contain the simplified expression for P after substituting the condition "(sin(b) == sin(a)^3)" into the original equation. If the condition is not automatically extracted from the simplification process, you can manually apply the substitution as shown in the code above.
Hope this helps!
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!