Skip to content

Instantly share code, notes, and snippets.

@qharlie
Last active April 11, 2017 18:55
Show Gist options
  • Save qharlie/5b3fe07e4cf91a5a79376bbfa66a790e to your computer and use it in GitHub Desktop.
Save qharlie/5b3fe07e4cf91a5a79376bbfa66a790e to your computer and use it in GitHub Desktop.
The radius of a sphere is increasing at a rate of 7.5 meters per minute.
At a certain instant, the radius is 5 meters.
What is the rate of change of the surface area of the sphere at that instant (in square meters per minute)?
@qharlie
Copy link
Author

qharlie commented Feb 8, 2017

S (t) = 4* pi * [r(t)]^2 * ( dr/dt r(t))

Solve for derivative of S, the answer is 300 pi, just wondering how to model this in Octave. Im familiar with how to do one unknown and the symbolic package, just not sure how to do this one

@qharlie
Copy link
Author

qharlie commented Feb 8, 2017

Where the Surface of a sphere is 4 * pi * r^2

@rballet
Copy link

rballet commented Feb 8, 2017

Hello @qorrect!
I'll try to help. I don't know if it is exactly what you want, but you could do this in Matlab (I'm using a R2016b version, so it could be different in other versions):

syms t
radius_rate = 7.5;
radius = radius_rate*t;
surf_area = 4*pi*radius^2;
surf_area_rate = diff(surf_area,t);
radius_goal = 5;
t_goal = solve(radius == radius_goal, t);
result = subs(surf_area_rate, t, t_goal);

... or more compact:

syms t
result = subs(diff(4*pi*(7.5*t)^2, t), t, solve(7.5*t==5,t));

Hope it helps!

@qharlie
Copy link
Author

qharlie commented Apr 11, 2017

Thank you @rballet it did help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment