Oppgave 1
Vis løsning
Hva spør oppgaven om? Vi skal integrere et produkt av et polynom og en trigonometrisk funksjon. Delvis integrasjon reduserer polynomgraden.
- Velg deleneSett \(u=4x\) og \(dv=\cos x\,dx\).
- Finn du og v\[du=4\,dx,\qquad v=\sin x\]
- Bruk formelen\[\int u\,dv=uv-\int v\,du\]
- Sett inn\[\int4x\cos x\,dx=4x\sin x-\int4\sin x\,dx\]
- Integrer restleddetFordi \(\int\sin x\,dx=-\cos x\), får vi \[4x\sin x+4\cos x+C.\]
- Kontroller ved derivasjon\(\frac d{dx}(4x\sin x+4\cos x)=4\sin x+4x\cos x-4\sin x=4x\cos x\).
Digital kontroll i GeoGebra/CAS
Integral(4x cos(x),x)Digital kontroll i Python
from sympy import symbols, sin, cos, integrate, diff, simplify
x = symbols('x', real=True)
integrand = 4*x*cos(x)
F = integrate(integrand, x)
expected = 4*x*sin(x) + 4*cos(x)
print("Integrand =", integrand)
print("Stamfunksjon fra SymPy =", F)
print("Forventet form =", expected)
print("Derivert tilbake =", simplify(diff(expected, x)))
print("Kontrollforskjell =", simplify(diff(expected, x) - integrand))
assert simplify(diff(expected, x) - integrand) == 0
Kjørt utskriftIntegrand = 4*x*cos(x)
Stamfunksjon fra SymPy = 4*x*sin(x) + 4*cos(x)
Forventet form = 4*x*sin(x) + 4*cos(x)
Derivert tilbake = 4*x*cos(x)
Kontrollforskjell = 0Fasit: \(4x\sin x+4\cos x+C\).