Skip to content

Instantly share code, notes, and snippets.

@ajaykumarsampath
Last active August 29, 2015 14:24
Show Gist options
  • Select an option

  • Save ajaykumarsampath/5f41a689895a1bbfec07 to your computer and use it in GitHub Desktop.

Select an option

Save ajaykumarsampath/5f41a689895a1bbfec07 to your computer and use it in GitHub Desktop.
clear all
syms a b w l r k Q x;
f1=a^2+4*(w*l+r*k-r*k*x)*(b-a)/((1-x)*Q/x);
f=symfun(0.5*(a+...
(a^2+4*(w*l+r*k-r*k*x)*(b-a)...
/((1-x)*Q/x))^0.5),[a b w l r k Q x]);
g=diff(f,x);
%{
result
g(a, b, w, l, r, k, Q, x) =
-((x*(a - b)*(4*k*r + 4*l*w - 4*k*r*x))/(Q*(x - 1)^2) -
((a - b)*(4*k*r + 4*l*w - 4*k*r*x))/(Q*(x - 1)) +
(4*k*r*x*(a - b))/(Q*(x - 1)))/(4*(a^2 + (x*(a - b)*(4*k*r + 4*l*w - 4*k*r*x))/(Q*(x - 1)))^(1/2))
%}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment