041907-132A-clab 2

# 041907-132A-clab 2 - gp x is g x In other words verify that...

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

C HEMICAL E NGINEERING 132A Professor Todd Squires Spring Quarter, 2007 Computer Lab Assignment 2 Integration and problem-solving in Mathematica E XERCISES Commands: Integrate[x^2,x] Integrate[x^2,{x,0,3}] Solve[x^2+2 x ==3,x] DSolve[{y’’[x] == y’[x] + y[x], y[0] == 1, y’[0] == 0}, y[x], x] x^2/.x->5 ysol[x_]:=y[x]/.DSolve[{y’’[x] == y’[x] + y[x], y[0] == 1, y’[0] == 0}, y[x], x] 1) Enter the following functions into Mathematica: g ( x ) = x log( x 2 + x ) (1) p ( x ) = xe x/ 5 cos( x ) (2) y ( x ) = x 2 e 2 x (3) 2) Calculate the indeFnite integral of each of these functions, calling the new function gi ( x ), etc. Calculate the derivative of each function, calling it gp(x), etc. Plot each function, its indeFnite integral, and its derivative from 0 to 10. 3) Verify that the derivative of gi ( x ) is g ( x ), and that the integral of
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: gp ( x ) is g ( x ). In other words, verify that Mathematica is doing your integrals and derivatives correctly. 4) Integrate each of the functions from 0 to 10. 5) Solve each of the following equations: ax 2 + bx + c = 0 (4) y 3 + 3 y 2 + 3 y + 1 = 0 (5) y 3 + 3 y 2 + 3 y + 2 = 0 (6) y 3 + 3 y 2 + 3 y = 0 (7) 6) ±ind the general solution of the di²erential equations s ′′ ( t ) + 5 s ′ ( t ) + 4 s ( t ) = 0 (8) s ′′ ( t ) + 4 s ( t ) = 0 (9) 7) ±ind the solution to the di²erential equation s ′′ ( t ) + 1 4 s ′ ( t ) + 4 s ( t ) = cos(2 t ) (10) subject to initial conditions s (0) = 0 (11) s ′ (0) = 5 . (12) Plot your result for times t from 0 to 30....
View Full Document

## This note was uploaded on 12/29/2011 for the course CHE 132a taught by Professor Gordon,m during the Fall '08 term at UCSB.

Ask a homework question - tutors are online