2015 EKAINA

1.

f[x_]=x^4+3x^2-2x-5

Plot[f[x],{x,-2,2}]

a) 
1. erroa -1
2. erroa 1

b) NEWTON RAPHSON 
x0=1
e=10^-4
i<50
t=15 digitu esanguratsu
Pantailaratu

For[x0=1;i=1; tol=10^(-4);err=tol+1,i<50&&err>tol,i++,x1=SetPrecision[x0-(f[x0]/f'[x0]),15];err=Abs[(x1-x0)/x1];Print[i," garren iterazioan hurbilketa = ",x1," eta errorea = ",err];x0=x1]

c) PUNTU FINKOKO METODOA [-1,0] tartean dagoen erroaren hurbilketa egiteko

g1[x_]=((2x+5-x^4)/3)^(1/2)

g2[x_]=((2x+5)/(3+x^2))^(1/2)

g3[x_]=-((2x+5)/(3+x^2))^(1/2)

g4[x_]=x+(x^4+3x^2-2x-5)/7

Plot[{g1'[x],g2'[x],g3'[x],g4'[x]},{x,-1,0}]

g4 erabiliko dut funtzio sinpleena baita g2,g3 eta g4-ren artean; hala ere, hiruretako edozein erabiltzea zuzena izango litzateke, hirurek konbergitzen baitute aztertzen gabilltzan erroan

d)

x0=-1;i=1;tol=10^(-4);err=tol+1;
While[i<50&&err>tol,x1=SetPrecision[g4[x0],15];err=Abs[(x1-x0)/x1];Print[i," garren iterazioan hurbilketa = ",x1," eta errorea = ",err];x0=x1;i=i+1]

2.
a)

g[t_]=-t*(UnitStep[t]-UnitStep[t-1])-UnitStep[t-1]

b)

eku=y''[t]+4y[t]==g[t]

ekutrans=LaplaceTransform[eku,t,s]/.{y[0]->0,y'[0]->0}

lys=LaplaceTransform[y[t],t,s]

soltrans=Solve[ekutrans,lys]

Y1[s_]=soltrans[[1]]

y1[t_]=InverseLaplaceTransform[Y1[s],s,t]

Plot[(1/8) (-2 t-HeavisideTheta[-1+t] (2-2 t+Sin[2 (-1+t)])+Sin[2 t]),{t,-20,10}]

yt0=y1[t]/.t->0

yt3=y1[t]/.t->3

3.

f[x_,y_]=(-Exp[x*y]*(2(x^2)y-y^2+4x))/(Exp[x*y]*(2x^3-x*y-1))

a)

a=StreamPlot[{1,f[x,y]},{x,0.5,2},{y,2,4}]

eku=y'[x]==-(2*x^2*y[x]-y[x]^2+4*x)/(2*x^3-x*y[x]-1)

sol=DSolve[{eku,y[1]==1},y[x],{x,0.5,2}] //Simplify

yso[x_]=y[x]/.sol[[1]]

b=Plot[((2 (x^3)+ProductLog[-(E^(1-2 (x^3))) x])/x),{x,0.5,2},PlotStyle->{Red}]

Show[a,b]

ekua=Exp[x*y[x]]*(2*x^2-y[x])==k

deku=D[eku,x]