0% found this document useful (0 votes)
36 views

Problem 1

The document contains solutions to 5 problems: 1. MATLAB code and plots for generating equations are attached. 2. No information provided. 3. Two equations are solved for their intersection points, found to be (1,1) and (8,-6). 4. Equations for two circles are derived and rewritten. Their intersection points are calculated to be (1,1) and (8,-6). 5. An exact solution for a given differential equation is verified. Numerical solutions are calculated using the Euler method, starting at x0=1, y0=2 and stepping to x2=4, y3=-0.09411.

Uploaded by

Carlo Karam
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Problem 1

The document contains solutions to 5 problems: 1. MATLAB code and plots for generating equations are attached. 2. No information provided. 3. Two equations are solved for their intersection points, found to be (1,1) and (8,-6). 4. Equations for two circles are derived and rewritten. Their intersection points are calculated to be (1,1) and (8,-6). 5. An exact solution for a given differential equation is verified. Numerical solutions are calculated using the Euler method, starting at x0=1, y0=2 and stepping to x2=4, y3=-0.09411.

Uploaded by

Carlo Karam
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Problem 1:

I attached the MATLAB code used to generate each of the requested equations along with
their respective plots. The code displays the equations clearly, and you can use it to follow
the procedure I adopted in determining said equations.
Problem 2:

Problem 3:
sin x− y=−1
xy−2=0
Modifying the second equation, we find y=2 / x, and plug that in the first equation.
2
⟹ sin x− =−1
x
2 2
Solving for f ( x )=0 , with f ( x )=sin x− +1 and f ' ( x )=cos x− 2
x x
Using Newton’s method, starting at the middle of the interval [0,2], we find r0 = 1, r1 =
1.062405571, r2 = 1.066386278, r3 = 1.066401111, r4 = 1.066401111.
Problem 4:

a) 52= ( x−4 )2+ ( y +3 )2


25=x2 −8 x+16+ y 2+ 6 y+ 9
0=x 2−8 x+ y 2+6 y

132= ( x−13 )2+ ( y−16 )2


169=x 2 + y 2−26 x−12 y +169+36
x 2+ y 2−26 x−12 y+ 36=0

f 1 ( x , y ) =x2 −8 x+ y 2 +6 y
f 2 ( x , y ) =x 2+ y 2 −26 x−12 y +36

∂f1 ∂f1

b) Jacobian matrix J=
∂x
∂f2
∂x
[ ][ ∂ y = 2 x−8
∂f2
∂y
2 y +6
2 x−26 2 y −12

|J|=4 xy−24 x +6 y +96−4 xy +52 y−12 x +156


]
¿−36 x−36 y +252

1 2 y−12 −2 y +6
−1
J = [
−36 x−36 y +252 −2 x+26 2 x−8 ]
x 0=[3,1]T
x 1=x 0 ∙ J −1 f ( x 0 )

[−1.0000
x 1=
1.6667 ]
x =[1.7018 ]
2
1.0000
0.6152
x =[
3
1.0573 ]

c) x 2−8 x + y 2+ 6 y=0
x 2+ y 2−26 x−12 y+ 36=0

Both of these are equations of circles, which we can rewrite as:

x 2−8 x + y ( y +6)=0
x 2−26 x +¿

The intersect at two points which are (1,1) and (8,-6).


Problem 5:
4+ cos 2−cos 2 x
a) y ( x ) =
2 x2
2 sin 2 x −1
y '=
2x 2 ( )
+(4+cos 2−cos 2 x) 3
x

sin 2 x 4+cos 2−cos 2 x −1


y '=
x 2
+
( 2 x )( x ) (2 x )2 3
2

sin 2 x −1
y '=
x 2
+( y ∙ 2 x )
( x ) 3

sin 2 x 2 xy sin 2 x−2 xy


y'= − 2 =
x2 x x2
Therefore, y(x) is indeed the exact solution.
b) y n+ 1= y n +h y ' n+1
sin 2 x n−2 x n y n
y n+ 1= y n +
x n2

x0 = 1, y0 = 2, y ( 2 )= y 1=−1.09070

x1 = 2, y1 = -1.09070, y ( 3 )= y 2=−0.1892

x2 = 2, y2 = -0.1892, y ( 4 )= y 3=−0.09411
c) MATLAB code

You might also like