Quiz11_Solution - 3. Finally, evaluate df 3 for ( a,b,x ) =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Quiz 11: Symbolic Name: ASE 201 1. Write the code, utilizing the Matlab symbolic toolbox, that will find the following integral: Z 2 π 0 c [sin( ax ) cos( bx )] dx where a , b and c are constants. Save the result as the variable g . Then write the code that will give a simplified version of the result and save that as the variable h . Finally, evaluate h for ( a,b,c ) = (1 , 2 , 3). 2. Write the code, utilizing the Matlab symbolic toolbox, that will find the THIRD deriva- tive of the following function: f ( x ) = ax 3 + x sin( bx ) where a and b are constants. Save the result as the variable df 3. Then write the code that will give a simplified version of the result and save that also as the variable df
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 3. Finally, evaluate df 3 for ( a,b,x ) = (1 , 2 ,π ). Solution: % 1 >> syms a b c x >> f = c*(sin(a*x)*cos(b*x)); % Do not have to have f; could put directly into int >> g = int(f,x,0,2*pi); >> h = simple(g); % or h = simplify(g) >> ans_1 = subs(h,[a,b,c],[1,2,3]);--------------------------------------------------------% 2 >> syms a b x >> f = a*x^3 + x*sin(b*x); % Do not have to have f; could put directly into diff >> df_3 = diff(f,x,3); >> df_3 = simple(df_3); % or df_3 = simplify(df_3) >> ans_2 = subs(df_3,[a,b,x],[1,2,pi]);...
View Full Document

This note was uploaded on 02/14/2010 for the course ASE 201 taught by Professor Hayes during the Spring '07 term at University of Texas.

Ask a homework question - tutors are online