-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIntegral.html
More file actions
98 lines (70 loc) · 3.07 KB
/
Copy pathIntegral.html
File metadata and controls
98 lines (70 loc) · 3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
layout: default
title: Integral of a function
---
<style media="screen">
</style>
<script type="text/javascript">
var str="";
function func(){
var place=document.getElementById('1').value;
var x=document.getElementById('2').value;
var a = nerdamer(`integrate(${place},x)`);
var e = nerdamer(a.toString(),{x:parseInt(x)}).evaluate();
const dtm = document.querySelector('style');//changing the contents of style tag to chnage the css of grid that is for input matrix1
dtm.innerHTML = `.matrix:before { left: -6px;border-right: 0;display: block;} .grid-container{display:grid;align:center;grid-template-columns: ${str};padding: 5px;width: 10px;} .matrix:after { right: -6px;border-left: 0;display: block;}.paragraphout{background-color: lightgrey;margin-top:25px;font-size: 18px;line-height: 28.5px;color:black;padding-left: 15px;padding-right: 30px;margin-right:40px;text-align:left;display: block;} #out{display:block}`;
document.getElementById("a").innerHTML="Function that you entered is <br>"+place;
document.getElementById("b").innerHTML="After integrating the function we get: <br> "+a.toString();
document.getElementById("c").innerHTML= "Now substituing the value of x= <br>"+x;
document.getElementById("d").innerHTML= "After solving we get: <br>"+e.text();
}
</script>
<div class="right">
<div class="main-heading">
<h3><strong>Integral of a function</strong></h3>
</div>
<div class="paragraph">
<br>
<p> An integral is a mathematical object that can be interpreted as an area or a generalization of area.</p>
<p>Integration is a method of adding or summing up the parts to find the whole.</p>
<p>Integration is a reverse process of differentiation.</p>
</div>
<br>
<p>In general, the integral of a real-valued function f(x) with respect to a real variable x on an interval [a, b] is written as shown in below figure: <br></p>
<br>
<img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/249ee3fdbced31dfc328ff357f67bb134ca66b8d" alt=""> <br>
<br>
<div class="paragraph-2">
<p><strong>Example:</strong><br>
Consider the function f(x)= -4x**3-8x**2-4 <br>
then the intergration of f(x) is <br></p></div>
<img src="https://miro.medium.com/max/294/0*lYHJlwrRCm5chmbd.png" alt="">
<br>
<br>
<p >Now, Let's jump in to have fun, <strong>Practically trying them...</strong></p>
<h3 style="font-weight: bold;">Enter the function in input section </h3>
<br>
<div class="input">
<input id="1" type="text" placeholder="Ex : sin(x)*tan(x)+x^5" ></div>
<br>
<h3 style="font-weight: bold;">Enter the value of x </h3>
<br>
<div class="input-2">
<input id="2" type="text" placeholder="Enter the value of x"></div>
<br>
<br>
<a onclick="func()" href="#footer" class="submit">Submit</a>
<br>
<br><br>
<h4 id="out" style="font-weight: bold;" >OUTPUT SECTION:</h4>
<br>
<div class="paragraphout">
<br>
<br>
<h5 id="a"></h5><br>
<h5 id="b"></h5><br>
<h5 id="c"></h5><br>
<h5 id="d"></h5><br>
</div>
</div>
</div>